Version 1.0 - Stable

This commit is contained in:
2026-01-06 16:59:05 +00:00
parent 8de538cc29
commit 81b497517e
9 changed files with 7038 additions and 7068 deletions
@@ -1,13 +1,16 @@
// app/api/events/[id]/results/route.ts
// app/api/events/[event_id]/results/route.ts
import { query } from '@/lib/db';
import { NextResponse } from 'next/server';
import { NextResponse, NextRequest } from 'next/server';
export const dynamic = 'force-dynamic';
export async function GET(
request: Request,
{ params }: { params: { id: string } }
) {
request: NextRequest,
context: { params: Promise<{ event_id: string }> }
) {
const { event_id } = await context.params;
try {
const standingsSql = `
SELECT
@@ -35,7 +38,7 @@ export async function GET(
ORDER BY tcs.total_points DESC, tcs.best_finish ASC
`;
const standings = await query(standingsSql, [params.id]);
const standings = await query(standingsSql, [event_id]);
return NextResponse.json({ standings });
} catch (error) {