11 lines
464 B
TypeScript
11 lines
464 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { auth } from "@/app/(auth)/auth";
|
|
import { executeRemoveBackgroundPOST } from "@/lib/canvas/operations/rmbg";
|
|
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({ error: "未登录" }, { status: 401 });
|
|
return executeRemoveBackgroundPOST(request, session.user.id);
|
|
}
|