mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
feat: add custom user JavaScript
This commit is contained in:
parent
f16735fd6d
commit
e07203ad46
26 changed files with 89 additions and 32 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue