- Fixes for fallback
This commit is contained in:
@@ -166,7 +166,7 @@ module.exports = {
|
||||
allSubmitted: (e) => {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
ProfileModel
|
||||
.find({ submitted: { $eq: true } })
|
||||
.find({ submitted: true })
|
||||
.sort({ order: 1 })
|
||||
.populate({
|
||||
path: 'messages',
|
||||
@@ -185,10 +185,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
promise.then((result) => {
|
||||
e.emit('all', null, result);
|
||||
e.emit('allSubmitted', null, result);
|
||||
})
|
||||
.catch((err) => {
|
||||
e.emit('all', err, null);
|
||||
e.emit('allSubmitted', err, null);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -214,10 +214,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
promise.then((result) => {
|
||||
e.emit('all', null, result);
|
||||
e.emit('allVerified', null, result);
|
||||
})
|
||||
.catch((err) => {
|
||||
e.emit('all', err, null);
|
||||
e.emit('allVerified', err, null);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user