S5: onboarding → minne + smaksignaler (user_stated)
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
|
||||
import { t } from "../lib/i18n.js";
|
||||
import { KNOWN_FLAGS } from "@app/feature-flags";
|
||||
import { syncOnboardingMemory } from "../lib/onboardingMemory.js";
|
||||
|
||||
/**
|
||||
* Progressive onboarding (FAS 1b): 3-layer flow.
|
||||
@@ -227,6 +228,16 @@ export async function onboardingRoutes(app: FastifyInstance) {
|
||||
});
|
||||
}
|
||||
|
||||
// S5: spegla alla uttryckligen angivna preferenser i minne + smaksignaler.
|
||||
const [completedPrefs] = await app.db
|
||||
.select()
|
||||
.from(schema.userPreferences)
|
||||
.where(eq(schema.userPreferences.userId, req.userId))
|
||||
.limit(1);
|
||||
if (completedPrefs) {
|
||||
await syncOnboardingMemory(app.db, req.userId, completedPrefs);
|
||||
}
|
||||
|
||||
const [user] = await app.db
|
||||
.update(schema.users)
|
||||
.set({
|
||||
|
||||
Reference in New Issue
Block a user