Skip to content

Commit

Permalink
Fix sort
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackIQ committed Apr 22, 2023
1 parent e09bc79 commit 557a6c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/user/user.controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const MY_LOGS = async (req, res) => {

try {
const logs = await Log.find({ company: id })
.sort({ createdAt: -1 })
.populate({
path: "service",
model: Service,
Expand Down Expand Up @@ -114,6 +115,7 @@ export const MY_ANALYTICS = async (req, res) => {

try {
const data = await Log.find({ company: id })
.sort({ createdAt: -1 })
.populate({
path: "service",
model: Service,
Expand Down

0 comments on commit 557a6c7

Please sign in to comment.