mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
fix(ai): accept every app language on the chat and status requests
The Coach chat, the document chat and the fenced chat declared their locale field as de/en, so a body naming French, Korean, Brazilian Portuguese or any other shipped language was refused with 422 before resolveServerLocale, which carries every locale, ever saw it. The same pair sat on the profile update, so an account could not store any other language there either, and the stored language is what the cookie-blind background work (the Coach nudge, notification texts) writes in. All four now take z.enum(locales), and the published contract for the metric, insight and biomarker status queries and the profile update lists every UI locale instead of two.
This commit is contained in:
1 parent
65fe5c34e3
commit
6f60812132
10 files changed
+197
-42
No files matched your search
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import type { Locale } from "@/lib/i18n/config";
|
||||
import {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@@ -895,7 +896,7 @@ export interface SendCoachMessageParams {
|
||||
conversationId?: string;
|
||||
message: string;
|
||||
prefill?: string;
|
||||
locale?: "en" | "de";
|
||||
locale?: Locale;
|
||||
/**
|
||||
* v1.4.20.1 — optional snapshot scope (per-source toggles + window)
|
||||
* driven by the sources-rail picker. When omitted the server falls
|
||||
|
||||
Reference in new issue
Block a user