Files
winninghunter/src/app/api/plans/route.ts
T
2026-07-07 20:40:43 +03:00

8 lines
263 B
TypeScript

import { NextResponse } from "next/server";
import { prisma } from "@/lib/db";
export async function GET() {
const plans = await prisma.plan.findMany({ where: { isActive: true }, orderBy: { sortOrder: "asc" } });
return NextResponse.json({ data: plans });
}