mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
parent
ec47106c26
commit
83e1f154b5
26 changed files with 131 additions and 13 deletions
|
@ -33,6 +33,7 @@ type User struct {
|
|||
DefaultReadingSpeed int `json:"default_reading_speed"`
|
||||
CJKReadingSpeed int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage string `json:"default_home_page"`
|
||||
CategoriesSortOrder string `json:"categories_sort_order"`
|
||||
}
|
||||
|
||||
// UserCreationRequest represents the request to create a user.
|
||||
|
@ -65,6 +66,7 @@ type UserModificationRequest struct {
|
|||
DefaultReadingSpeed *int `json:"default_reading_speed"`
|
||||
CJKReadingSpeed *int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage *string `json:"default_home_page"`
|
||||
CategoriesSortOrder *string `json:"categories_sort_order"`
|
||||
}
|
||||
|
||||
// Patch updates the User object with the modification request.
|
||||
|
@ -144,6 +146,10 @@ func (u *UserModificationRequest) Patch(user *User) {
|
|||
if u.DefaultHomePage != nil {
|
||||
user.DefaultHomePage = *u.DefaultHomePage
|
||||
}
|
||||
|
||||
if u.CategoriesSortOrder != nil {
|
||||
user.CategoriesSortOrder = *u.CategoriesSortOrder
|
||||
}
|
||||
}
|
||||
|
||||
// UseTimezone converts last login date to the given timezone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue