15 lines
391 B
TypeScript
15 lines
391 B
TypeScript
import { NextRequest } from 'next/server'
|
|
import { oapiClient, sendResponse } from '../../oapi-client'
|
|
|
|
export async function POST(req: NextRequest) {
|
|
const body = req.body ? await req.json() : {}
|
|
const { file_path, task_id } = body
|
|
|
|
const res = await oapiClient.post('/v1/super_agent/chat/oss_url', {
|
|
file_path: file_path,
|
|
task_id: task_id,
|
|
})
|
|
|
|
return sendResponse(res)
|
|
}
|