feat: implement core platform features including business directory, admin dashboard, authentication, and API infrastructure
Some checks failed
Build and Push App / build (push) Failing after 16m2s
Some checks failed
Build and Push App / build (push) Failing after 16m2s
This commit is contained in:
14
app/api/plans/route.ts
Normal file
14
app/api/plans/route.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import prisma from '@/lib/prisma';
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const plans = await prisma.pricingPlan.findMany({
|
||||
orderBy: { offerLimit: 'asc' }
|
||||
});
|
||||
return NextResponse.json(plans);
|
||||
} catch (error) {
|
||||
console.error('GET /api/plans error:', error);
|
||||
return NextResponse.json({ error: 'Erreur lors du chargement des plans' }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user