2025-08-20 17:14:23 +02:00
|
|
|
import { authOptions } from '@/lib/auth';
|
2025-08-20 14:14:33 +02:00
|
|
|
import { getDashboardStats } from '@/lib/stats';
|
|
|
|
|
import { getServerSession } from 'next-auth';
|
|
|
|
|
import { NextResponse } from 'next/server';
|
|
|
|
|
|
|
|
|
|
export async function GET() {
|
|
|
|
|
const session = await getServerSession(authOptions);
|
|
|
|
|
const stats = await getDashboardStats(session?.user?.id);
|
|
|
|
|
return NextResponse.json(stats);
|
|
|
|
|
}
|