From 76148b27f7501bac061992136852be4303370c8d Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 1 Jun 2021 01:36:53 +0200 Subject: refactor API errors to standard error format --- server/controllers/api/users/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/api/users/index.ts') 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) { Hooks.runAction('action:api.user.deleted', { user }) - return res.sendStatus(HttpStatusCode.NO_CONTENT_204) + return res.status(HttpStatusCode.NO_CONTENT_204).end() } async function updateUser (req: express.Request, res: express.Response) { @@ -349,7 +349,7 @@ async function updateUser (req: express.Request, res: express.Response) { // Don't need to send this update to followers, these attributes are not federated - return res.sendStatus(HttpStatusCode.NO_CONTENT_204) + return res.status(HttpStatusCode.NO_CONTENT_204).end() } async function askResetUserPassword (req: express.Request, res: express.Response) { -- cgit v1.2.3