no message
This commit is contained in:
@@ -114,7 +114,7 @@ ProfileSchema.pre('save', function (next) {
|
|||||||
|
|
||||||
const ProfileModel = Mongoose.model('profiles', ProfileSchema);
|
const ProfileModel = Mongoose.model('profiles', ProfileSchema);
|
||||||
|
|
||||||
function getChatImages (id, match, callback) {
|
function getChatImages (profileId, match, callback) {
|
||||||
callback = callback || (typeof match === 'function' ? match : function(){});
|
callback = callback || (typeof match === 'function' ? match : function(){});
|
||||||
match = typeof match === 'object' ? match : {};
|
match = typeof match === 'object' ? match : {};
|
||||||
match['messages.image'] = { $exists: true };
|
match['messages.image'] = { $exists: true };
|
||||||
@@ -161,9 +161,9 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
allMessages: (e, prodileId) => {
|
allMessages: (e, profileId) => {
|
||||||
const promise = new Promise((resolve, reject) => {
|
const promise = new Promise((resolve, reject) => {
|
||||||
ProfileModel.findById(prodileId, (err, result) => {
|
ProfileModel.findById(profileId, (err, result) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user