From ea2576f182c8d4a50ba15f5c2c25fd52977ed6b9 Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sun, 4 Mar 2018 22:09:36 -0500 Subject: [PATCH] no message --- models/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/profile.js b/models/profile.js index 5e03390..42414bd 100644 --- a/models/profile.js +++ b/models/profile.js @@ -174,7 +174,7 @@ module.exports = { .populate({ path: 'messages', match: { $and: [{ isUser: true }, { image: { $exists: true } }, { text: { $exists: false } }] }, - select: 'image -_id -isUser -order -text -timestamp', + select: '-_id -isUser -order -text -timestamp', sort: { order: 1 } }) .exec((err, result) => {