S5: onboarding → minne + smaksignaler (user_stated)

This commit is contained in:
Sven (AAMOS AI)
2026-08-11 04:43:43 +07:00
parent 1e18146665
commit f86a37dd33
26 changed files with 10812 additions and 2 deletions
+4
View File
@@ -12,6 +12,7 @@ import { computeDailyTargets, DEFAULT_TARGETS } from "@app/nutrition-engine";
import { errors, parse } from "../lib/errors.js";
import { audit, generateInviteCode, getActiveHouseholdId } from "../lib/helpers.js";
import { loadEntitlementsWithToken } from "../lib/entitlements.js";
import { syncOnboardingMemory } from "../lib/onboardingMemory.js";
/** Profil, preferenser, samtycken, dagsmål, GDPR-export/-radering (spec §6, §56). */
export async function meRoutes(app: FastifyInstance) {
@@ -120,6 +121,9 @@ export async function meRoutes(app: FastifyInstance) {
target: schema.userPreferences.userId,
set: { ...input.preferences, updatedAt: new Date() },
});
// S5: spegla uttryckligen angivna preferenser i minne + smaksignaler.
await syncOnboardingMemory(app.db, req.userId, input.preferences);
}
let householdId: string | null = await getActiveHouseholdId(app.db, req.userId);