From 0519e4feff271d9357b77cbb994c6880a93a5af5 Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sun, 4 Mar 2018 23:13:02 -0500 Subject: [PATCH] no message --- models/profile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/profile.js b/models/profile.js index 3cf3d01..617d8e9 100644 --- a/models/profile.js +++ b/models/profile.js @@ -114,7 +114,7 @@ ProfileSchema.pre('save', function (next) { const ProfileModel = Mongoose.model('profiles', ProfileSchema); -function getChatImages (id, match, callback) { +function getChatImages (profileId, match, callback) { callback = callback || (typeof match === 'function' ? match : function(){}); match = typeof match === 'object' ? match : {}; match['messages.image'] = { $exists: true }; @@ -161,9 +161,9 @@ module.exports = { }); }, - allMessages: (e, prodileId) => { + allMessages: (e, profileId) => { const promise = new Promise((resolve, reject) => { - ProfileModel.findById(prodileId, (err, result) => { + ProfileModel.findById(profileId, (err, result) => { if (err) { reject(err); }