Skip to content

Commit cd71a43

Browse files
committed
fix json name for farm in account
1 parent 8e48ae0 commit cd71a43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node-registrar/pkg/db/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type Account struct {
1919
PublicKey string `gorm:"type:text;not null;unique" json:"public_key"`
2020
// Relations | likely we need to use OnDelete:RESTRICT (Prevent Twin deletion if farms exist)
2121
// @swagger:ignore
22-
Farms []Farm `gorm:"foreignKey:TwinID;references:TwinID;constraint:OnDelete:RESTRICT"`
22+
Farms []Farm `gorm:"foreignKey:TwinID;references:TwinID;constraint:OnDelete:RESTRICT" json:"farms"`
2323
}
2424

2525
type Farm struct {

0 commit comments

Comments
 (0)