diff --git a/models/User.go b/models/User.go index 23cea1e..0abff8b 100644 --- a/models/User.go +++ b/models/User.go @@ -9,6 +9,7 @@ import ( type User struct { ID int `json:"id" gorm:"primary_key"` + Gold int `json:"gold"` Name string `json:"name"` Email string `json:"email" gorm:"unique;not null"` Password string `json:"-"` diff --git a/models/account.go b/models/account.go index 8d4cb6f..3566bc2 100644 --- a/models/account.go +++ b/models/account.go @@ -11,6 +11,7 @@ import ( type Account struct { ID int `json:"id"` + Gold int `json:"gold"` Name string `json:"name"` Email string `json:"email"` Admin bool `json:"admin"` @@ -87,6 +88,7 @@ func AccountRead(w http.ResponseWriter, r *http.Request, cb func(account *Accoun var account Account account.ID = user.ID + account.Gold = user.Gold account.Name = user.Name account.Email = user.Email account.Admin = user.Admin