Files
pn-new-crm/src/app/api/v1/dashboard/kpis/route.ts

10 lines
312 B
TypeScript
Raw Normal View History

import { NextRequest, NextResponse } from 'next/server';
import { withAuth } from '@/lib/api/helpers';
import { getKpis } from '@/lib/services/dashboard.service';
export const GET = withAuth(async (req: NextRequest, ctx) => {
const result = await getKpis(ctx.portId);
return NextResponse.json(result);
});