mirror of
https://github.com/langgenius/webapp-text-generator.git
synced 2026-07-01 20:05:07 -04:00
68dee014e7
* chore: fix version of Next.js * workflow run api supported * support workflow process * add scripts of editor
14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
import { type NextRequest } from 'next/server'
|
|
import { client, getInfo } from '@/app/api/utils/common'
|
|
|
|
export async function POST(request: NextRequest) {
|
|
const body = await request.json()
|
|
const {
|
|
inputs,
|
|
files,
|
|
} = body
|
|
const { user } = getInfo(request)
|
|
const res = await client.runWorkflow(inputs, user, true, files)
|
|
return new Response(res.data as any)
|
|
}
|