13 lines
390 B
TypeScript
13 lines
390 B
TypeScript
import { getAdminOk, handleCreateImport } from "./handlers";
|
|
|
|
export const runtime = "nodejs";
|
|
|
|
export async function POST(request: Request): Promise<Response> {
|
|
const bodyJson = await request.json().catch(() => ({}));
|
|
const res = await handleCreateImport({
|
|
adminOk: getAdminOk(request.headers),
|
|
body: bodyJson,
|
|
});
|
|
return Response.json(res.body, { status: res.status });
|
|
}
|