10 lines
352 B
TypeScript
10 lines
352 B
TypeScript
import { NextRequest, NextResponse } from "next/server";
|
|
import { getBackend } from "@/lib/backend";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function GET(req: NextRequest) {
|
|
const scope = req.nextUrl.searchParams.get("scope") ?? undefined;
|
|
return NextResponse.json({ tickets: await getBackend().listTickets(scope ?? undefined) });
|
|
}
|