Skip to content

Open source alternatives to paid SaaS apps: Notion, Slack, Auth0, Vercel and more. Curated list with licenses and GitHub stars.

Remove unrelated code files

Anil Chandra Naidu Matchaa36f81ae1af3
diff --git a/src/app/api/checkout/route.js b/src/app/api/checkout/route.js
deleted file mode 100644
index 66aafb8..0000000
--- a/src/app/api/checkout/route.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { NextResponse } from "next/server";
-import { getServerSession } from "next-auth/next";
-import { authOptions } from "@/lib/auth";
-import { BillingService } from "@/lib/services/billing";
-
-export async function POST(req) {
- try {
- const session = await getServerSession(authOptions);
- if (!session || !session.user) {
- return NextResponse.json({ error: "Unauthorized. Please sign in." }, { status: 401 });
- }
-
- const { planId } = await req.json();
- if (!planId) {
- return NextResponse.json({ error: "Missing planId parameter" }, { status: 400 });
- }
-
- const checkoutUrl = await BillingService.createCheckoutSession(session.user.id, planId);
- return NextResponse.json({ url: checkoutUrl });
- } catch (error) {
- console.error("Checkout route error:", error);
- return NextResponse.json({ error: error.message }, { status: 500 });
- }
-}