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) => {