mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-27 20:57:43 +02:00
feat(mana-auth): add /api/v1/settings endpoint for user settings sync
The unified web app calls auth.mana.how/api/v1/settings to sync theme, nav, locale, and device settings — but the endpoint was missing, causing 404 errors in production. Implements all 7 CRUD routes against the existing auth.user_settings table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f070d022c1
commit
4825aef262
2 changed files with 225 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ import { createAuthRoutes } from './routes/auth';
|
|||
import { createGuildRoutes } from './routes/guilds';
|
||||
import { createApiKeyRoutes, createApiKeyValidationRoute } from './routes/api-keys';
|
||||
import { createMeRoutes } from './routes/me';
|
||||
import { createSettingsRoutes } from './routes/settings';
|
||||
import { createAdminRoutes } from './routes/admin';
|
||||
|
||||
// ─── Bootstrap ──────────────────────────────────────────────
|
||||
|
|
@ -82,6 +83,12 @@ app.route('/api/v1/api-keys', createApiKeyValidationRoute(apiKeysService));
|
|||
app.use('/api/v1/me/*', jwtAuth(config.baseUrl));
|
||||
app.route('/api/v1/me', createMeRoutes(userDataService));
|
||||
|
||||
// ─── Settings ──────────────────────────────────────────────
|
||||
|
||||
app.use('/api/v1/settings/*', jwtAuth(config.baseUrl));
|
||||
app.use('/api/v1/settings', jwtAuth(config.baseUrl));
|
||||
app.route('/api/v1/settings', createSettingsRoutes(db));
|
||||
|
||||
// ─── Admin ──────────────────────────────────────────────────
|
||||
|
||||
app.use('/api/v1/admin/*', jwtAuth(config.baseUrl));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue