From 68505721792ca9a66463c7c6d9eb277ace74fcb2 Mon Sep 17 00:00:00 2001 From: Amirhossein Mohammadi Date: Sat, 22 Apr 2023 15:29:41 +0330 Subject: [PATCH] Fix sort --- app/controllers/user/user.controllers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/user/user.controllers.js b/app/controllers/user/user.controllers.js index d236680..3e89738 100644 --- a/app/controllers/user/user.controllers.js +++ b/app/controllers/user/user.controllers.js @@ -26,6 +26,7 @@ export const MY_LOGS = async (req, res) => { try { const logs = await Log.find({ tid: id }) + .sort({ createdAt: -1 }) .populate({ path: "service", model: Service,