diff options
Diffstat (limited to 'internal/model/user.go')
-rw-r--r-- | internal/model/user.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/model/user.go b/internal/model/user.go index 9a3428e9..ba14b99d 100644 --- a/internal/model/user.go +++ b/internal/model/user.go @@ -21,6 +21,7 @@ type User struct { EntryDirection string `json:"entry_sorting_direction"` EntryOrder string `json:"entry_sorting_order"` Stylesheet string `json:"stylesheet"` + CustomJS string `json:"custom_js"` GoogleID string `json:"google_id"` OpenIDConnectID string `json:"openid_connect_id"` EntriesPerPage int `json:"entries_per_page"` @@ -60,6 +61,7 @@ type UserModificationRequest struct { EntryDirection *string `json:"entry_sorting_direction"` EntryOrder *string `json:"entry_sorting_order"` Stylesheet *string `json:"stylesheet"` + CustomJS *string `json:"custom_js"` GoogleID *string `json:"google_id"` OpenIDConnectID *string `json:"openid_connect_id"` EntriesPerPage *int `json:"entries_per_page"` @@ -118,6 +120,10 @@ func (u *UserModificationRequest) Patch(user *User) { user.Stylesheet = *u.Stylesheet } + if u.CustomJS != nil { + user.CustomJS = *u.CustomJS + } + if u.GoogleID != nil { user.GoogleID = *u.GoogleID } |