import { prisma } from "@/lib/prisma"; import { NextResponse } from "next/server"; export async function GET() { try { const plans = await prisma.oneShotPlan.findMany({ orderBy: { type: 'asc' } }); return NextResponse.json(plans); } catch (error) { console.error("Failed to fetch one-shot plans:", error); return NextResponse.json({ error: "Failed to fetch plans" }, { status: 500 }); } }