feat: modernized web application

This commit is contained in:
2026-03-31 15:21:08 +09:00
parent f7019403c4
commit 7e07c7ea99
48 changed files with 1569 additions and 103 deletions

View File

@@ -0,0 +1,23 @@
import { NextResponse } from 'next/server';
import { getPlayersForTournament } from '@/lib/data';
export const dynamic = 'force-dynamic';
type RouteContext = {
params: Promise<{ key: string }>;
};
export async function GET(_request: Request, context: RouteContext) {
try {
const { key } = await context.params;
const data = await getPlayersForTournament(key);
if (data === null) {
return NextResponse.json({ error: 'Tournament not found' }, { status: 404 });
}
return NextResponse.json(data);
} catch (e) {
console.error(e);
return NextResponse.json([], { status: 500 });
}
}