From feb34f6b6b991046aab6a10df747b48fa4da07a7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 May 2020 17:39:07 +0200 Subject: Use video abuse filters on client side --- server/controllers/api/videos/abuse.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'server/controllers/api/videos') diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts index bc7df48c8..3fe7f7e51 100644 --- a/server/controllers/api/videos/abuse.ts +++ b/server/controllers/api/videos/abuse.ts @@ -14,7 +14,8 @@ import { videoAbuseGetValidator, videoAbuseReportValidator, videoAbusesSortValidator, - videoAbuseUpdateValidator + videoAbuseUpdateValidator, + videoAbuseListValidator } from '../../../middlewares' import { AccountModel } from '../../../models/account/account' import { VideoAbuseModel } from '../../../models/video/video-abuse' @@ -34,6 +35,7 @@ abuseVideoRouter.get('/abuse', videoAbusesSortValidator, setDefaultSort, setDefaultPagination, + videoAbuseListValidator, asyncMiddleware(listVideoAbuses) ) abuseVideoRouter.put('/:videoId/abuse/:id', @@ -70,7 +72,14 @@ async function listVideoAbuses (req: express.Request, res: express.Response) { start: req.query.start, count: req.query.count, sort: req.query.sort, + id: req.query.id, search: req.query.search, + state: req.query.state, + videoIs: req.query.videoIs, + searchReporter: req.query.searchReporter, + searchReportee: req.query.searchReportee, + searchVideo: req.query.searchVideo, + searchVideoChannel: req.query.searchVideoChannel, serverAccountId: serverActor.Account.id, user }) -- cgit v1.2.3