From d4ff49878975101d30f1a730baaadb558e9245cc Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Tue, 29 May 2018 18:50:02 -0400 Subject: [PATCH] - Fixes for fallback --- models/profile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/profile.js b/models/profile.js index e36173b..df062ad 100644 --- a/models/profile.js +++ b/models/profile.js @@ -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); }); },