aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/abuse.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/abuse.ts')
-rw-r--r--server/controllers/api/abuse.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts
index 25d6e2ab0..0ab74bdff 100644
--- a/server/controllers/api/abuse.ts
+++ b/server/controllers/api/abuse.ts
@@ -6,6 +6,7 @@ import { AbuseModel } from '@server/models/abuse/abuse'
6import { AbuseMessageModel } from '@server/models/abuse/abuse-message' 6import { AbuseMessageModel } from '@server/models/abuse/abuse-message'
7import { getServerActor } from '@server/models/application/application' 7import { getServerActor } from '@server/models/application/application'
8import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' 8import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse'
9import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
9import { AbuseCreate, AbuseState, UserRight } from '../../../shared' 10import { AbuseCreate, AbuseState, UserRight } from '../../../shared'
10import { getFormattedObjects } from '../../helpers/utils' 11import { getFormattedObjects } from '../../helpers/utils'
11import { sequelizeTypescript } from '../../initializers/database' 12import { sequelizeTypescript } from '../../initializers/database'
@@ -141,7 +142,7 @@ async function updateAbuse (req: express.Request, res: express.Response) {
141 142
142 // Do not send the delete to other instances, we updated OUR copy of this abuse 143 // Do not send the delete to other instances, we updated OUR copy of this abuse
143 144
144 return res.sendStatus(204) 145 return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
145} 146}
146 147
147async function deleteAbuse (req: express.Request, res: express.Response) { 148async function deleteAbuse (req: express.Request, res: express.Response) {
@@ -153,7 +154,7 @@ async function deleteAbuse (req: express.Request, res: express.Response) {
153 154
154 // Do not send the delete to other instances, we delete OUR copy of this abuse 155 // Do not send the delete to other instances, we delete OUR copy of this abuse
155 156
156 return res.sendStatus(204) 157 return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
157} 158}
158 159
159async function reportAbuse (req: express.Request, res: express.Response) { 160async function reportAbuse (req: express.Request, res: express.Response) {
@@ -243,5 +244,5 @@ async function deleteAbuseMessage (req: express.Request, res: express.Response)
243 return abuseMessage.destroy({ transaction: t }) 244 return abuseMessage.destroy({ transaction: t })
244 }) 245 })
245 246
246 return res.sendStatus(204) 247 return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
247} 248}