13 lines
561 B
TypeScript
13 lines
561 B
TypeScript
import { executeWorkflowAnalysisResponse } from "@/lib/video-canvas/workflow-analysis-response";
|
|
import { NextResponse } from "next/server";
|
|
import { auth } from "@/app/(auth)/auth";
|
|
export const runtime = "nodejs";
|
|
export const maxDuration = 180;
|
|
export async function POST(request: Request) {
|
|
const session = await auth();
|
|
if (!session?.user?.id)
|
|
return NextResponse.json({ success: false, error: "未登录" }, { status: 401 });
|
|
const body = await request.json().catch(() => ({}));
|
|
return executeWorkflowAnalysisResponse(body, request.signal);
|
|
}
|