Files
homepage/src/routes/tasks/rewards/+page.server.ts
Alexander Bocken 9027dd9881
Some checks failed
CI / update (push) Has been cancelled
tasks: shared task board with sticker rewards, difficulty levels, and calendar
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
2026-04-02 07:32:55 +02:00

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()
};
};