Merge pull request #545 from atishamte/bugfix/chatMessageOrder
ChatMessage Order Fixed
This commit is contained in:
commit
ae50443ec1
|
|
@ -306,8 +306,13 @@ export class App {
|
|||
|
||||
// Get all chatmessages from chatflowid
|
||||
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({
|
||||
where: {
|
||||
chatflowid: req.params.id
|
||||
},
|
||||
order: {
|
||||
createdDate: 'ASC'
|
||||
}
|
||||
})
|
||||
return res.json(chatmessages)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue