3fd15cf00b
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
965 B
TypeScript
29 lines
965 B
TypeScript
import { dispatch } from '@/lib/router';
|
|
import { NextRequest, NextResponse } from 'next/server';
|
|
|
|
// Import all handlers to register their routes
|
|
import '@/lib/handlers/player';
|
|
import '@/lib/handlers/battlepass';
|
|
import '@/lib/handlers/game';
|
|
import '@/lib/handlers/payments';
|
|
import '@/lib/handlers/leaderboard';
|
|
import '@/lib/handlers/cards';
|
|
import '@/lib/handlers/equipment';
|
|
import '@/lib/handlers/arsenal';
|
|
import '@/lib/handlers/marketplace';
|
|
import '@/lib/handlers/contracts';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export async function GET(request: NextRequest, { params }: { params: { path: string[] } }) {
|
|
return dispatch(request, params.path, 'GET');
|
|
}
|
|
|
|
export async function POST(request: NextRequest, { params }: { params: { path: string[] } }) {
|
|
return dispatch(request, params.path, 'POST');
|
|
}
|
|
|
|
export async function PUT(request: NextRequest, { params }: { params: { path: string[] } }) {
|
|
return dispatch(request, params.path, 'PUT');
|
|
}
|