From: Chocobozzz Date: Fri, 5 Aug 2016 16:08:55 +0000 (+0200) Subject: Server: fix status code when updating/removing a user X-Git-Tag: v0.0.1-alpha~797 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=10431358b27ec1bb4de7ccd662465cf544f1cdcd;p=github%2FChocobozzz%2FPeerTube.git Server: fix status code when updating/removing a user --- diff --git a/server/controllers/api/v1/users.js b/server/controllers/api/v1/users.js index d831a0de6..057dcaf8d 100644 --- a/server/controllers/api/v1/users.js +++ b/server/controllers/api/v1/users.js @@ -122,7 +122,7 @@ function removeUser (req, res, next) { return next(err) } - return res.type('json').status(204).end() + return res.sendStatus(204) }) } @@ -134,7 +134,7 @@ function updateUser (req, res, next) { user.save(function (err) { if (err) return next(err) - return res.json('json').status(204).end() + return res.sendStatus(204) }) }) }