add showboat fam and rotating data

This commit is contained in:
JCEEE
2026-09-10 15:03:27 +01:00
parent a270d965fe
commit 4730ab3eb9
2 changed files with 376 additions and 2 deletions
@@ -2,6 +2,7 @@ import { redirect } from '@sveltejs/kit';
import { createPbClient } from '$lib/server/pocketbase';
import { createServices, type ChatActor } from '$lib/server/services';
import { ensureFamAccess } from '$lib/server/access';
import { seedDemoCompletions } from '$lib/server/migrate';
async function paydayCheck(famId: string, pbToken: string) {
try {
@@ -46,6 +47,11 @@ async function resolveChatIdentity(
}
export async function load(event) {
// Demo family: rotate 3-week completion data on every visit (idempotent).
if (event.params.fam === 'showboaters') {
seedDemoCompletions().catch(() => {});
}
const session = event.locals.user;
const role = session?.role || 'child';
const isParent = role === 'parent';