mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Make default home page configurable
This commit is contained in:
parent
45a9fd5af6
commit
03a1cfcd5e
30 changed files with 125 additions and 14 deletions
|
@ -32,6 +32,7 @@ type User struct {
|
|||
DisplayMode string `json:"display_mode"`
|
||||
DefaultReadingSpeed int `json:"default_reading_speed"`
|
||||
CJKReadingSpeed int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage string `json:"default_home_page"`
|
||||
}
|
||||
|
||||
// UserCreationRequest represents the request to create a user.
|
||||
|
@ -63,6 +64,7 @@ type UserModificationRequest struct {
|
|||
DisplayMode *string `json:"display_mode"`
|
||||
DefaultReadingSpeed *int `json:"default_reading_speed"`
|
||||
CJKReadingSpeed *int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage *string `json:"default_home_page"`
|
||||
}
|
||||
|
||||
// Patch updates the User object with the modification request.
|
||||
|
@ -138,6 +140,10 @@ func (u *UserModificationRequest) Patch(user *User) {
|
|||
if u.CJKReadingSpeed != nil {
|
||||
user.CJKReadingSpeed = *u.CJKReadingSpeed
|
||||
}
|
||||
|
||||
if u.DefaultHomePage != nil {
|
||||
user.DefaultHomePage = *u.DefaultHomePage
|
||||
}
|
||||
}
|
||||
|
||||
// UseTimezone converts last login date to the given timezone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue