Skip to content

Commit

Permalink
add first chat message not found from API call
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHengZJ committed Jun 17, 2023
1 parent 767b6c0 commit d10dce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d10dce0

Please sign in to comment.