Add an account-linked theme preference endpoint #19

Closed
opened 2026-10-26 12:53:52 +00:00 by Gilles · 0 comments
Owner

Expose a per-user visual theme preference, synced across devices rather than left to browser-local storage, to back a frontend theme switcher.

  • New UserPreferences model (one-to-one with the user), theme field with 3 choices, default editorial-eleve
  • GET /me/ returns the current theme (falls back to the default when no preference row exists yet)
  • PUT /me/theme/ saves the choice, rejects anything outside the 3 allowed slugs
Expose a per-user visual theme preference, synced across devices rather than left to browser-local storage, to back a frontend theme switcher. - New UserPreferences model (one-to-one with the user), theme field with 3 choices, default editorial-eleve - GET /me/ returns the current theme (falls back to the default when no preference row exists yet) - PUT /me/theme/ saves the choice, rejects anything outside the 3 allowed slugs
Sign in to join this conversation.
No description provided.