feat(quick-261016-0fm): per-admin theme and locale preferences
- GET and PUT /account/preferences (own row only, interactive sessions, CSRF header on cookie writes) store admin_theme and admin_locale in backend_users.metadata, keeping every other key - GET /auth/me and the My account answers carry preferences - phrasebook.Translator.Locales lists the locales defining a prefix - route tables, conformance cases, OpenAPI document, TS types and docs
This commit is contained in:
@@ -267,6 +267,8 @@ func (s *service) mount(r pact.Router) {
|
||||
// My account: the signed-in admin edits their own profile.
|
||||
// interactiveOnly refuses personal API tokens before requireAjax.
|
||||
g.Put("/account", interactiveOnly(requireAjax(s.accountUpdate)))
|
||||
g.Get("/account/preferences", interactiveOnly(s.accountPreferencesGet))
|
||||
g.Put("/account/preferences", interactiveOnly(requireAjax(s.accountPreferencesUpdate)))
|
||||
g.Post("/account/avatar", interactiveOnly(requireAjax(s.avatarUpload)))
|
||||
g.Delete("/account/avatar", interactiveOnly(requireAjax(s.avatarRemove)))
|
||||
g.Get("/account/tokens", interactiveOnly(s.accountTokensList))
|
||||
|
||||
Reference in New Issue
Block a user