aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-05 18:08:55 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-05 18:08:55 +0200
commit10431358b27ec1bb4de7ccd662465cf544f1cdcd (patch)
tree060bb5ea99b38a865cb315c78f42760759ab16cc /server/controllers/api/v1
parent66af9ee16d5b61bb707f359b750b25f2faff306c (diff)
downloadPeerTube-10431358b27ec1bb4de7ccd662465cf544f1cdcd.tar.gz
PeerTube-10431358b27ec1bb4de7ccd662465cf544f1cdcd.tar.zst
PeerTube-10431358b27ec1bb4de7ccd662465cf544f1cdcd.zip
Server: fix status code when updating/removing a user
Diffstat (limited to 'server/controllers/api/v1')
-rw-r--r--server/controllers/api/v1/users.js4
1 files changed, 2 insertions, 2 deletions
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) {
122 return next(err) 122 return next(err)
123 } 123 }
124 124
125 return res.type('json').status(204).end() 125 return res.sendStatus(204)
126 }) 126 })
127} 127}
128 128
@@ -134,7 +134,7 @@ function updateUser (req, res, next) {
134 user.save(function (err) { 134 user.save(function (err) {
135 if (err) return next(err) 135 if (err) return next(err)
136 136
137 return res.json('json').status(204).end() 137 return res.sendStatus(204)
138 }) 138 })
139 }) 139 })
140} 140}