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.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts
index ee046cb3a..38808021d 100644
--- a/server/controllers/api/abuse.ts
+++ b/server/controllers/api/abuse.ts
@@ -23,7 +23,7 @@ import { AccountModel } from '../../models/account/account'
23 23
24const abuseRouter = express.Router() 24const abuseRouter = express.Router()
25 25
26abuseRouter.get('/abuse', 26abuseRouter.get('/',
27 authenticate, 27 authenticate,
28 ensureUserHasRight(UserRight.MANAGE_ABUSES), 28 ensureUserHasRight(UserRight.MANAGE_ABUSES),
29 paginationValidator, 29 paginationValidator,
@@ -33,18 +33,18 @@ abuseRouter.get('/abuse',
33 abuseListValidator, 33 abuseListValidator,
34 asyncMiddleware(listAbuses) 34 asyncMiddleware(listAbuses)
35) 35)
36abuseRouter.put('/:videoId/abuse/:id', 36abuseRouter.put('/:id',
37 authenticate, 37 authenticate,
38 ensureUserHasRight(UserRight.MANAGE_ABUSES), 38 ensureUserHasRight(UserRight.MANAGE_ABUSES),
39 asyncMiddleware(abuseUpdateValidator), 39 asyncMiddleware(abuseUpdateValidator),
40 asyncRetryTransactionMiddleware(updateAbuse) 40 asyncRetryTransactionMiddleware(updateAbuse)
41) 41)
42abuseRouter.post('/:videoId/abuse', 42abuseRouter.post('/',
43 authenticate, 43 authenticate,
44 asyncMiddleware(abuseReportValidator), 44 asyncMiddleware(abuseReportValidator),
45 asyncRetryTransactionMiddleware(reportAbuse) 45 asyncRetryTransactionMiddleware(reportAbuse)
46) 46)
47abuseRouter.delete('/:videoId/abuse/:id', 47abuseRouter.delete('/:id',
48 authenticate, 48 authenticate,
49 ensureUserHasRight(UserRight.MANAGE_ABUSES), 49 ensureUserHasRight(UserRight.MANAGE_ABUSES),
50 asyncMiddleware(abuseGetValidator), 50 asyncMiddleware(abuseGetValidator),
@@ -74,7 +74,7 @@ async function listAbuses (req: express.Request, res: express.Response) {
74 count: req.query.count, 74 count: req.query.count,
75 sort: req.query.sort, 75 sort: req.query.sort,
76 id: req.query.id, 76 id: req.query.id,
77 filter: 'video', 77 filter: req.query.filter,
78 predefinedReason: req.query.predefinedReason, 78 predefinedReason: req.query.predefinedReason,
79 search: req.query.search, 79 search: req.query.search,
80 state: req.query.state, 80 state: req.query.state,