From ce89d6cc783df9a9fb441bb764a5d7158671189b Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 26 Dec 2017 21:55:56 -0500 Subject: [PATCH] there is going to be a string of terrible commit messages while i fix this and the world will have to accept this --- server/migrations/moveBucket.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/migrations/moveBucket.js b/server/migrations/moveBucket.js index aeaa4b78..21054b66 100644 --- a/server/migrations/moveBucket.js +++ b/server/migrations/moveBucket.js @@ -24,9 +24,11 @@ mongoose.connection.on('error', () => { // }, // }); -const numProjects = Project.count({}); -console.log(numProjects); -process.exit(0); +Project.count({}) +.exec().then((err, count) => { + console.log(count); + process.exit(0); +}); // Project.find({}, (err, projects) => { // projects.forEach((project, projectIndex) => {