aboutsummaryrefslogtreecommitdiff
path: root/internal/model/user.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2024-10-05 20:37:30 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2024-10-05 21:21:12 -0700
commite555e442fba0a9ca3c8cf67444e8c42f79db359a (patch)
treee7ee91ff4842ef23569833e0443be91545d4c42e /internal/model/user.go
parent600dea6ce54989a792e666a0a26de0ee847e4562 (diff)
downloadv2-e555e442fba0a9ca3c8cf67444e8c42f79db359a.tar.gz
v2-e555e442fba0a9ca3c8cf67444e8c42f79db359a.tar.zst
v2-e555e442fba0a9ca3c8cf67444e8c42f79db359a.zip
feat: add new settings option to allow external fonts
Diffstat (limited to 'internal/model/user.go')
-rw-r--r--internal/model/user.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/model/user.go b/internal/model/user.go
index ba14b99d..ad070904 100644
--- a/internal/model/user.go
+++ b/internal/model/user.go
@@ -22,6 +22,7 @@ type User struct {
EntryOrder string `json:"entry_sorting_order"`
Stylesheet string `json:"stylesheet"`
CustomJS string `json:"custom_js"`
+ ExternalFontHosts string `json:"external_font_hosts"`
GoogleID string `json:"google_id"`
OpenIDConnectID string `json:"openid_connect_id"`
EntriesPerPage int `json:"entries_per_page"`
@@ -62,6 +63,7 @@ type UserModificationRequest struct {
EntryOrder *string `json:"entry_sorting_order"`
Stylesheet *string `json:"stylesheet"`
CustomJS *string `json:"custom_js"`
+ ExternalFontHosts *string `json:"external_font_hosts"`
GoogleID *string `json:"google_id"`
OpenIDConnectID *string `json:"openid_connect_id"`
EntriesPerPage *int `json:"entries_per_page"`
@@ -124,6 +126,10 @@ func (u *UserModificationRequest) Patch(user *User) {
user.CustomJS = *u.CustomJS
}
+ if u.ExternalFontHosts != nil {
+ user.ExternalFontHosts = *u.ExternalFontHosts
+ }
+
if u.GoogleID != nil {
user.GoogleID = *u.GoogleID
}