From 334da90b26951aabd735c5d509891ea32243802d Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sun, 4 Mar 2018 17:42:52 -0500 Subject: [PATCH] no message --- models/profile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/profile.js b/models/profile.js index aa1ab8a..58cd48e 100644 --- a/models/profile.js +++ b/models/profile.js @@ -132,7 +132,12 @@ module.exports = { find: (e, find) => { const promise = new Promise((resolve, reject) => { - var query = ProfileModel.find(find); + var query = ProfileModel + .find(find.find) + .skip(find.options.skip) + .limit(find.options.limit) + .sort(find.options.sort) + .select(find.select || ''); if (!find.select || (find.select.length && find.select.indexOf('messages'))) { query.populate({