feat(api): add PATCH endpoint and fix preferences API paths
- Add PATCH method to PreferencesController for partial updates - Fix profile page API path: /users/me/preferences → /api/users/me/preferences - Fix appearance page API path: same prefix correction - Add controller and service spec files Closes SS-API-002 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,7 @@ export default function ProfilePage(): ReactElement {
|
||||
setPrefsError(null);
|
||||
|
||||
try {
|
||||
const data = await apiGet<UserPreferences>("/users/me/preferences");
|
||||
const data = await apiGet<UserPreferences>("/api/users/me/preferences");
|
||||
setPreferences(data);
|
||||
} catch (err: unknown) {
|
||||
const message = err instanceof Error ? err.message : "Could not load preferences";
|
||||
|
||||
@@ -240,7 +240,7 @@ export default function AppearanceSettingsPage(): ReactElement {
|
||||
setLocalTheme(themeId);
|
||||
setSaving(true);
|
||||
try {
|
||||
await apiPatch("/users/me/preferences", { theme: themeId });
|
||||
await apiPatch("/api/users/me/preferences", { theme: themeId });
|
||||
} catch {
|
||||
// Theme is still applied locally even if API save fails
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user