This commit is contained in:
parent
08f6de0bd7
commit
5e93ecee73
12 changed files with 241 additions and 109 deletions
|
@ -15,21 +15,21 @@ type User struct {
|
|||
// All data here will always be included, even if empty,
|
||||
// in which case it will be marked as null instead of omitted
|
||||
|
||||
ID string `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ServerId uint `json:"server_id"`
|
||||
Displayname string `json:"displayname"`
|
||||
Username string `json:"username"`
|
||||
Description string `json:"description"`
|
||||
IsBot bool `json:"is_bot"`
|
||||
IconId *string `json:"icon_id"`
|
||||
BackgroundId *string `json:"background_id"`
|
||||
BannerId *string `json:"banner_id"`
|
||||
Indexable bool `json:"indexable"`
|
||||
PublicKey []byte `json:"public_key"`
|
||||
RestrictedFollow bool `json:"restricted_follow"`
|
||||
Location *string `json:"location"`
|
||||
Birthday *time.Time `json:"birthday"`
|
||||
ID string `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ServerId uint `json:"server_id"`
|
||||
Displayname string `json:"displayname"`
|
||||
Username string `json:"username"`
|
||||
Description string `json:"description"`
|
||||
IsBot bool `json:"is_bot"`
|
||||
IconId *string `json:"icon_id"`
|
||||
BackgroundId *string `json:"background_id"`
|
||||
BannerId *string `json:"banner_id"`
|
||||
Indexable bool `json:"indexable"`
|
||||
PublicKey []byte `json:"public_key"`
|
||||
RestrictedFollow bool `json:"restricted_follow"`
|
||||
Location *string `json:"location"`
|
||||
Birthday *string `json:"birthday"`
|
||||
|
||||
// ---- Section Debug data ----
|
||||
// All these entries should only be available
|
||||
|
@ -113,7 +113,7 @@ func (u *User) FromModel(m *models.User) {
|
|||
u.Location = &m.Location.String
|
||||
}
|
||||
if m.Birthday.Valid {
|
||||
u.Birthday = &m.Birthday.Time
|
||||
u.Birthday = &m.Birthday.String
|
||||
}
|
||||
u.Verified = &m.Verified
|
||||
u.FinishedRegistration = &m.FinishedRegistration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue