Make AvatarURL a pointer in user model to handle null values

This commit is contained in:
2026-05-17 02:27:20 -04:00
parent e132c7a580
commit 8d74f3e520
+1 -1
View File
@@ -138,7 +138,7 @@ type User struct {
DisplayName string `db:"display_name" json:"display_name"` DisplayName string `db:"display_name" json:"display_name"`
PasswordHash string `db:"password_hash" json:"-"` PasswordHash string `db:"password_hash" json:"-"`
Role string `db:"role" json:"role"` Role string `db:"role" json:"role"`
AvatarURL string `db:"avatar_url" json:"avatar_url,omitempty"` AvatarURL *string `db:"avatar_url" json:"avatar_url,omitempty"`
Active bool `db:"active" json:"active"` Active bool `db:"active" json:"active"`
LastLogin *time.Time `db:"last_login" json:"last_login"` LastLogin *time.Time `db:"last_login" json:"last_login"`
CreatedAt time.Time `db:"created_at" json:"created_at"` CreatedAt time.Time `db:"created_at" json:"created_at"`