aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-09 21:44:45 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-09 21:44:45 +0200
commit68a3b9f2aacb0225ae8b883b561b144bac339cbd (patch)
treee3d75b7952073ba4b2ef4b62ed57ded9f3cf0f1e /server/controllers
parent45b81debd6d6647980da7ad5a984bafa37cb79ea (diff)
downloadPeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.tar.gz
PeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.tar.zst
PeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.zip
Server: delete user with the id and not the username
Diffstat (limited to 'server/controllers')
-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 057dcaf8d..704df770c 100644
--- a/server/controllers/api/v1/users.js
+++ b/server/controllers/api/v1/users.js
@@ -34,7 +34,7 @@ router.put('/:id',
34 updateUser 34 updateUser
35) 35)
36 36
37router.delete('/:username', 37router.delete('/:id',
38 oAuth.authenticate, 38 oAuth.authenticate,
39 admin.ensureIsAdmin, 39 admin.ensureIsAdmin,
40 validatorsUsers.usersRemove, 40 validatorsUsers.usersRemove,
@@ -83,7 +83,7 @@ function listUsers (req, res, next) {
83function removeUser (req, res, next) { 83function removeUser (req, res, next) {
84 waterfall([ 84 waterfall([
85 function getUser (callback) { 85 function getUser (callback) {
86 User.loadByUsername(req.params.username, callback) 86 User.loadById(req.params.id, callback)
87 }, 87 },
88 88
89 function getVideos (user, callback) { 89 function getVideos (user, callback) {