S5: onboarding → minne + smaksignaler (user_stated)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user