mirror of
https://git.atakanozban.com/Songs2VID/songs2vid.git
synced 2026-11-14 21:29:49 +01:00
13 lines
410 B
TypeScript
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);
|
||
|
|
}
|