15 lines
554 B
TypeScript
15 lines
554 B
TypeScript
import { NextRequest } from "next/server";
|
|
import { handle } from "@/lib/api";
|
|
export const runtime = "nodejs";
|
|
export const dynamic = "force-dynamic";
|
|
async function route(
|
|
request: NextRequest,
|
|
{ params }: { params: Promise<{ path: string[] }> },
|
|
) {
|
|
const response = await handle(request, (await params).path);
|
|
// Includes private drafts, pairing credentials, token creation and errors.
|
|
response.headers.set("Cache-Control", "private, no-store");
|
|
return response;
|
|
}
|
|
export { route as GET, route as POST, route as PATCH, route as DELETE };
|