File size: 349 Bytes
532554f
680788a
532554f
c5474d5
a3ea1a9
 
c5474d5
532554f
 
 
 
 
 
c5474d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { NextResponse } from 'next/server';

import { getStats } from '@/lib/api';

export const dynamic = 'force-dynamic';

export async function GET() {
  try {
    const data = await getStats();
    return NextResponse.json(data);
  } catch (err) {
    return NextResponse.json({ error: `Failed to fetch stats: ${err}` }, { status: 500 });
  }
}