10 lines
312 B
TypeScript
10 lines
312 B
TypeScript
|
|
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);
|
||
|
|
});
|