From 3c1acfab622d470aeb1f44a708d6023530e17ec8 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 10 Dec 2017 21:08:42 +0100 Subject: more desiiiiiiiign --- bucky/app/bucky.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bucky/app/bucky.js') diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index 2b07f03..49ad8e0 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -176,7 +176,7 @@ var bucky = module.exports = { var hasComment = req.body.comment && req.body.comment.length var hasFile = req.files && req.files.length if (! hasComment && ! hasFile) { - console.log(">>> NO FILES OR COMMENT") + console.log(">>> no files or comment") return res.sendStatus(400) } next() @@ -249,6 +249,11 @@ var bucky = module.exports = { }) }) }) + Promise.all(promises).then(values => { + next() + }).catch(err => { + console.log(err) + }) }, /* MAIL */ -- cgit v1.2.3-70-g09d2