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