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.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts
index 50d068157..72e62fc0b 100644
--- a/server/controllers/api/abuse.ts
+++ b/server/controllers/api/abuse.ts
@@ -16,6 +16,7 @@ import {
16 asyncMiddleware, 16 asyncMiddleware,
17 asyncRetryTransactionMiddleware, 17 asyncRetryTransactionMiddleware,
18 authenticate, 18 authenticate,
19 checkAbuseValidForMessagesValidator,
19 deleteAbuseMessageValidator, 20 deleteAbuseMessageValidator,
20 ensureUserHasRight, 21 ensureUserHasRight,
21 getAbuseValidator, 22 getAbuseValidator,
@@ -58,12 +59,14 @@ abuseRouter.delete('/:id',
58abuseRouter.get('/:id/messages', 59abuseRouter.get('/:id/messages',
59 authenticate, 60 authenticate,
60 asyncMiddleware(getAbuseValidator), 61 asyncMiddleware(getAbuseValidator),
62 checkAbuseValidForMessagesValidator,
61 asyncRetryTransactionMiddleware(listAbuseMessages) 63 asyncRetryTransactionMiddleware(listAbuseMessages)
62) 64)
63 65
64abuseRouter.post('/:id/messages', 66abuseRouter.post('/:id/messages',
65 authenticate, 67 authenticate,
66 asyncMiddleware(getAbuseValidator), 68 asyncMiddleware(getAbuseValidator),
69 checkAbuseValidForMessagesValidator,
67 addAbuseMessageValidator, 70 addAbuseMessageValidator,
68 asyncRetryTransactionMiddleware(addAbuseMessage) 71 asyncRetryTransactionMiddleware(addAbuseMessage)
69) 72)
@@ -71,6 +74,7 @@ abuseRouter.post('/:id/messages',
71abuseRouter.delete('/:id/messages/:messageId', 74abuseRouter.delete('/:id/messages/:messageId',
72 authenticate, 75 authenticate,
73 asyncMiddleware(getAbuseValidator), 76 asyncMiddleware(getAbuseValidator),
77 checkAbuseValidForMessagesValidator,
74 asyncMiddleware(deleteAbuseMessageValidator), 78 asyncMiddleware(deleteAbuseMessageValidator),
75 asyncRetryTransactionMiddleware(deleteAbuseMessage) 79 asyncRetryTransactionMiddleware(deleteAbuseMessage)
76) 80)