Files
2026-07-17 02:23:59 +02:00

14 lines
382 B
TypeScript

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