add custom matches

This commit is contained in:
2026-03-09 20:28:04 +01:00
parent 8d1cd49339
commit 6b416dce31
24 changed files with 3289 additions and 55 deletions

View File

@@ -0,0 +1,13 @@
import { json, error } from '@sveltejs/kit';
import { getNotifications } from '$lib/server/notifications';
import type { RequestHandler } from './$types';
export const GET: RequestHandler = async ({ locals, url }) => {
if (!locals.user) error(401, 'Not logged in');
const limit = parseInt(url.searchParams.get('limit') ?? '50');
const offset = parseInt(url.searchParams.get('offset') ?? '0');
const notifications = await getNotifications(locals.user.id, { limit, offset });
return json(notifications);
};