User import now works
Some checks failed
/ docker (push) Failing after 3m56s

This commit is contained in:
Melody Becker 2025-04-15 17:18:56 +02:00
parent 08f6de0bd7
commit 5e93ecee73
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
12 changed files with 241 additions and 109 deletions

View file

@ -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