feat: add search and data tables

This commit is contained in:
2026-03-27 19:16:53 +01:00
parent ae4a77f5dd
commit 8d71480e9a
54 changed files with 2577 additions and 1577 deletions

View File

@@ -1,11 +1,15 @@
// src/routes/api/matches/[id]/rolling/+server.ts
import { json, error } from '@sveltejs/kit';
import { moveToRolling } from '$lib/server/match/engine';
import { requireRole } from '$lib/server/permissions';
import { requirePermission, GlobalPermission } from '$lib/server/permissions';
import type { RequestHandler } from './$types';
export const POST: RequestHandler = async ({ params, locals }) => {
requireRole(locals, 'referee', 'Only referees or admins can move matches to rolling');
requirePermission(
locals,
GlobalPermission.MATCH_REFEREE,
'Only referees or admins can move matches to rolling'
);
try {
const m = await moveToRolling(params.id);