We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df0c410 commit 1258479Copy full SHA for 1258479
backend/collaboration/src/routes/collaborationRoutes.ts
@@ -76,7 +76,7 @@ router.get("/sessions", async (req: Request, res: Response) => {
76
router.post("/sessions/:id", async (req: Request, res: Response) => {
77
try {
78
const { id } = req.params;
79
- const sessions: TSession[] = await Session.find({ users: id }).exec();
+ const sessions: TSession[] = await Session.find({ users: id }).sort({ createdAt: -1 }).exec();
80
81
return res.status(200).json(sessions);
82
} catch (error) {
0 commit comments