diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-01 01:36:53 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-02 16:57:07 +0200 |
commit | 76148b27f7501bac061992136852be4303370c8d (patch) | |
tree | fc0559253e833c9252fa14ebaec5321d88bfb4e8 /server/controllers/api/users/index.ts | |
parent | 5ed25fb76e920dac364cb9ef46f14ec4bd372949 (diff) | |
download | PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.gz PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.zst PeerTube-76148b27f7501bac061992136852be4303370c8d.zip |
refactor API errors to standard error format
Diffstat (limited to 'server/controllers/api/users/index.ts')
-rw-r--r-- | server/controllers/api/users/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index f384f0f28..d907b49bf 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts | |||
@@ -314,7 +314,7 @@ async function removeUser (req: express.Request, res: express.Response) { | |||
314 | 314 | ||
315 | Hooks.runAction('action:api.user.deleted', { user }) | 315 | Hooks.runAction('action:api.user.deleted', { user }) |
316 | 316 | ||
317 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 317 | return res.status(HttpStatusCode.NO_CONTENT_204).end() |
318 | } | 318 | } |
319 | 319 | ||
320 | async function updateUser (req: express.Request, res: express.Response) { | 320 | async function updateUser (req: express.Request, res: express.Response) { |
@@ -349,7 +349,7 @@ async function updateUser (req: express.Request, res: express.Response) { | |||
349 | 349 | ||
350 | // Don't need to send this update to followers, these attributes are not federated | 350 | // Don't need to send this update to followers, these attributes are not federated |
351 | 351 | ||
352 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 352 | return res.status(HttpStatusCode.NO_CONTENT_204).end() |
353 | } | 353 | } |
354 | 354 | ||
355 | async function askResetUserPassword (req: express.Request, res: express.Response) { | 355 | async function askResetUserPassword (req: express.Request, res: express.Response) { |