Files
songs2vid/app/api/account/api-rate-limit/route.ts
T
Atakan Doğan Özban 6476bb42a4 Strip Songs2VID to a payment-free self-hosted OSS core.
Remove Stripe/billing/pricing/marketing, simplify schema and entitlements for unlimited self-host use, and keep auth, encode, and YouTube upload.
2026-08-03 06:52:00 +02:00

13 lines
410 B
TypeScript

import { NextResponse } from "next/server";
import { getApiRateLimitStatus } from "@/lib/api-rate-limit";
import { getSessionUser } from "@/lib/session";
export async function GET() {
const user = await getSessionUser();
if (!user) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
const status = await getApiRateLimitStatus(user.id);
return NextResponse.json(status);
}