projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66af9ee
)
Server: fix status code when updating/removing a user
author
Chocobozzz
<florian.bigard@gmail.com>
Fri, 5 Aug 2016 16:08:55 +0000
(18:08 +0200)
committer
Chocobozzz
<florian.bigard@gmail.com>
Fri, 5 Aug 2016 16:08:55 +0000
(18:08 +0200)
server/controllers/api/v1/users.js
patch
|
blob
|
history
diff --git
a/server/controllers/api/v1/users.js
b/server/controllers/api/v1/users.js
index d831a0de67d7c35a01711bd8e6f47b020ab806c1..057dcaf8de1db5aa24ff629f478f1db5c8eeb687 100644
(file)
--- 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
)
})
})
}