feat(auth): GetProfile returns the account theme
The Android app's app-chrome theme (UX pass item 6) reads the account theme from GET /api/auth/profile and re-applies it at startup in SERVER sync mode. PUT /api/auth/theme already persisted the value; this completes the round trip on the profile read.
This commit is contained in:
@@ -101,6 +101,7 @@ type UserProfile struct {
|
|||||||
FirstName string `json:"first_name"`
|
FirstName string `json:"first_name"`
|
||||||
LastName string `json:"last_name"`
|
LastName string `json:"last_name"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
|
Theme string `json:"theme,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateProfileRequest struct {
|
type UpdateProfileRequest struct {
|
||||||
@@ -502,6 +503,7 @@ func (h *AuthHandler) GetProfile(c *echo.Context) error {
|
|||||||
FirstName: firstName,
|
FirstName: firstName,
|
||||||
LastName: lastName,
|
LastName: lastName,
|
||||||
Role: user.Role,
|
Role: user.Role,
|
||||||
|
Theme: user.Theme.String,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user