gbclient/app/api/bot/create-conversation/route.ts

20 lines
504 B
TypeScript
Raw Normal View History

import { NextResponse } from 'next/server'
export async function POST() {
try {
const response = await fetch('https://generalbots.online/directline/PROD-GeneralBots006/conversations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
})
const data = await response.json()
return NextResponse.json(data)
} catch (error) {
return NextResponse.json(
{ error: 'Failed to create conversation' },
{ status: 500 }
)
}
}