14 lines
432 B
TypeScript
14 lines
432 B
TypeScript
import { NextResponse } from 'next/server';
|
|
import { nasGet, requireSubscription, handleNasError } from '../../_nas';
|
|
|
|
export const maxDuration = 60;
|
|
|
|
export async function GET() {
|
|
try {
|
|
const auth = await requireSubscription();
|
|
if (auth instanceof NextResponse) return auth;
|
|
const data = await nasGet('/api/lotto/purchase/stats');
|
|
return NextResponse.json(data);
|
|
} catch (err) { return handleNasError(err); }
|
|
}
|