diff options
Diffstat (limited to 'app/api/vendor-pool/all/route.ts')
| -rw-r--r-- | app/api/vendor-pool/all/route.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/api/vendor-pool/all/route.ts b/app/api/vendor-pool/all/route.ts new file mode 100644 index 00000000..c21461b8 --- /dev/null +++ b/app/api/vendor-pool/all/route.ts @@ -0,0 +1,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 }); + } +} + |
