summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-10 21:08:42 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-10 21:08:42 +0100
commit3c1acfab622d470aeb1f44a708d6023530e17ec8 (patch)
treece596f9190c3fe8bcfba063670a6ec5a5da9d546 /bucky/app/bucky.js
parent3cc9ff370a5e3f5bf321dc56963ae3bc73e75284 (diff)
more desiiiiiiiign
Diffstat (limited to 'bucky/app/bucky.js')
-rw-r--r--bucky/app/bucky.js7
1 files changed, 6 insertions, 1 deletions
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 */