16 lines
500 B
TypeScript
16 lines
500 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
import { auth } from "@/app/(auth)/auth";
|
|
import { executeBoxCutoutPOST } from "@/lib/canvas/operations/box-cutout";
|
|
|
|
export const runtime = "nodejs";
|
|
export const maxDuration = 60;
|
|
|
|
export async function POST(request: Request) {
|
|
const session = await auth();
|
|
if (!session?.user?.id) {
|
|
return NextResponse.json({ success: false, error: "未授权,请先登录" }, { status: 401 });
|
|
}
|
|
return executeBoxCutoutPOST(request, session.user.id);
|
|
}
|