mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
ChatMessage Order Fixed
This commit is contained in:
@@ -306,8 +306,13 @@ export class App {
|
|||||||
|
|
||||||
// Get all chatmessages from chatflowid
|
// Get all chatmessages from chatflowid
|
||||||
this.app.get('/api/v1/chatmessage/:id', async (req: Request, res: Response) => {
|
this.app.get('/api/v1/chatmessage/:id', async (req: Request, res: Response) => {
|
||||||
const chatmessages = await this.AppDataSource.getRepository(ChatMessage).findBy({
|
const chatmessages = await this.AppDataSource.getRepository(ChatMessage).find({
|
||||||
chatflowid: req.params.id
|
where: {
|
||||||
|
chatflowid: req.params.id
|
||||||
|
},
|
||||||
|
order: {
|
||||||
|
createdDate: 'ASC'
|
||||||
|
},
|
||||||
})
|
})
|
||||||
return res.json(chatmessages)
|
return res.json(chatmessages)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user