feat(F-098): completed feature

This commit is contained in:
chattie
2026-08-20 22:39:06 +02:00
parent f1bf8c90c3
commit 3f1d08382f
8 changed files with 152 additions and 41 deletions

View File

@@ -0,0 +1,16 @@
# F-098 — Implementer evidence
## Root cause
`store_settings.updated_by` references `identity_users(id)`, while admin authentication returns IDs from `backoffice_users`. Saving settings therefore raised a PostgreSQL foreign-key error and surfaced as HTTP 500.
## Fix
`settings.routes.ts` now checks whether the authenticated ID exists in `identity_users`; it writes the audit ID only when valid, otherwise writes `NULL`, preserving the FK and allowing backoffice settings saves.
## Smoke test
- Authenticated `PATCH /api/admin/settings` with AI provider, base URL, model, and prompts: HTTP 200.
- Response includes saved AI configuration fields without exposing API key.
- Test rows removed after the smoke test.
- Services restarted successfully on ports 3000/3003/3004/3005.