summaryrefslogtreecommitdiff
path: root/app/api/vendor-pool/all/route.ts
blob: c21461b88c534ffe9a602964d888c746a6043998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { NextResponse } from 'next/server';
import { getAllVendorPools } from '@/lib/vendor-pool/service';

export const dynamic = 'force-dynamic';

export async function GET() {
  try {
    const data = await getAllVendorPools();
    return NextResponse.json(data);
  } catch (error) {
    console.error('Failed to fetch vendor pools:', error);
    return NextResponse.json({ error: 'Failed to fetch data' }, { status: 500 });
  }
}