From d56452cd8c61cf463cd1bfbb5488dfc2f7387175 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 11 Dec 2017 10:08:34 +0100 Subject: edit comments --- bucky/app/bucky.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bucky/app/bucky.js') diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index 2689c4b..8b829da 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -235,7 +235,9 @@ var bucky = module.exports = { } res.comment.set('comment', req.body.comment) res.comment.set('date', util.now()) - res.comment.save().then(next).catch(err => { + res.comment.save().then(() => { + next() + }).catch(err => { res.sendStatus(500) }) }, @@ -243,7 +245,7 @@ var bucky = module.exports = { res.comment.destroy().then(() => { next() }).catch(err => { - res.send(500) + res.sendStatus(500) }) }, -- cgit v1.2.3-70-g09d2