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/abuse.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/controllers/api/abuse.ts') diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts index 0ab74bdff..108627f81 100644 --- a/server/controllers/api/abuse.ts +++ b/server/controllers/api/abuse.ts @@ -142,7 +142,7 @@ async function updateAbuse (req: express.Request, res: express.Response) { // Do not send the delete to other instances, we updated OUR copy of this abuse - return res.sendStatus(HttpStatusCode.NO_CONTENT_204) + return res.status(HttpStatusCode.NO_CONTENT_204).end() } async function deleteAbuse (req: express.Request, res: express.Response) { @@ -154,7 +154,7 @@ async function deleteAbuse (req: express.Request, res: express.Response) { // Do not send the delete to other instances, we delete OUR copy of this abuse - return res.sendStatus(HttpStatusCode.NO_CONTENT_204) + return res.status(HttpStatusCode.NO_CONTENT_204).end() } async function reportAbuse (req: express.Request, res: express.Response) { @@ -244,5 +244,5 @@ async function deleteAbuseMessage (req: express.Request, res: express.Response) return abuseMessage.destroy({ transaction: t }) }) - return res.sendStatus(HttpStatusCode.NO_CONTENT_204) + return res.status(HttpStatusCode.NO_CONTENT_204).end() } -- cgit v1.2.3