Files
DataStack/app/api/metrics/route.ts
T

12 lines
425 B
TypeScript
Raw Normal View History

2026-10-23 11:43:49 -05:00
import { NextResponse } from 'next/server';
import { ApiEngine } from '@/core/apiEngine/apiService';
export async function GET() {
try {
const metrics = await ApiEngine.getDashboardMetrics();
return NextResponse.json(metrics);
} catch (err: unknown) {
const message = err instanceof Error ? err.message : 'Metrics calculation failed';
return NextResponse.json({ error: message }, { status: 500 });
}
}