Some checks failed
CI / update (push) Has been cancelled
Complete household task management system behind task_users auth group: - Task CRUD with recurring schedules, assignees, tags, and optional difficulty - Blobcat SVG sticker rewards on completion, rarity weighted by difficulty - Sticker collection page with calendar view and progress tracking - Redesigned cards with left accent urgency strip, assignee PFP, round check button - Weekday-based due date labels for tasks within 7 days - Tasks link added to homepage LinksGrid
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
import type { PageServerLoad } from './$types';
|
|
import { redirect } from '@sveltejs/kit';
|
|
|
|
export const load: PageServerLoad = async ({ locals, fetch }) => {
|
|
const session = await locals.auth();
|
|
if (!session) throw redirect(302, '/login');
|
|
|
|
const statsRes = await fetch('/api/tasks/stats');
|
|
|
|
return {
|
|
session,
|
|
stats: await statsRes.json()
|
|
};
|
|
};
|