no message
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user