Gold
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
ID int `json:"id" gorm:"primary_key"`
|
ID int `json:"id" gorm:"primary_key"`
|
||||||
|
Gold int `json:"gold"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Email string `json:"email" gorm:"unique;not null"`
|
Email string `json:"email" gorm:"unique;not null"`
|
||||||
Password string `json:"-"`
|
Password string `json:"-"`
|
||||||
|
@@ -11,6 +11,7 @@ import (
|
|||||||
|
|
||||||
type Account struct {
|
type Account struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
|
Gold int `json:"gold"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Admin bool `json:"admin"`
|
Admin bool `json:"admin"`
|
||||||
@@ -87,6 +88,7 @@ func AccountRead(w http.ResponseWriter, r *http.Request, cb func(account *Accoun
|
|||||||
|
|
||||||
var account Account
|
var account Account
|
||||||
account.ID = user.ID
|
account.ID = user.ID
|
||||||
|
account.Gold = user.Gold
|
||||||
account.Name = user.Name
|
account.Name = user.Name
|
||||||
account.Email = user.Email
|
account.Email = user.Email
|
||||||
account.Admin = user.Admin
|
account.Admin = user.Admin
|
||||||
|
Reference in New Issue
Block a user