diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-11 10:08:34 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-11 10:08:34 +0100 |
| commit | d56452cd8c61cf463cd1bfbb5488dfc2f7387175 (patch) | |
| tree | c9c680b2960691f9516900fa2d88bab780ee8ac3 /bucky/app/bucky.js | |
| parent | 242eed0093c59047033c286d7a14608d0096b125 (diff) | |
edit comments
Diffstat (limited to 'bucky/app/bucky.js')
| -rw-r--r-- | bucky/app/bucky.js | 6 |
1 files changed, 4 insertions, 2 deletions
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) }) }, |
