add first chat message not found from API call

This commit is contained in:
Henry 2023-06-17 09:57:26 +01:00
parent 767b6c07ab
commit d10dce0ccb
1 changed files with 2 additions and 2 deletions

View File

@ -507,8 +507,8 @@ export class App {
})
if (!chatflow) return res.status(404).send(`Chatflow ${chatflowid} not found`)
const chatId = await getChatId(chatflow.id)
if (!chatId) return res.status(500).send(`Chatflow ${chatflowid} first message not found`)
let chatId = await getChatId(chatflow.id)
if (!chatId) chatId = Date.now().toString()
if (!isInternal) {
await this.validateKey(req, res, chatflow)