diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-06 17:39:07 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-07 08:33:34 +0200 |
commit | feb34f6b6b991046aab6a10df747b48fa4da07a7 (patch) | |
tree | 02bb7277d45be166ba48caef2ee73bf89dbe1258 /server/controllers/api | |
parent | d170c5c580abf6f90d7bf144e2417e248ce2ecf4 (diff) | |
download | PeerTube-feb34f6b6b991046aab6a10df747b48fa4da07a7.tar.gz PeerTube-feb34f6b6b991046aab6a10df747b48fa4da07a7.tar.zst PeerTube-feb34f6b6b991046aab6a10df747b48fa4da07a7.zip |
Use video abuse filters on client side
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/abuse.ts | 11 |
1 files changed, 10 insertions, 1 deletions
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 { | |||
14 | videoAbuseGetValidator, | 14 | videoAbuseGetValidator, |
15 | videoAbuseReportValidator, | 15 | videoAbuseReportValidator, |
16 | videoAbusesSortValidator, | 16 | videoAbusesSortValidator, |
17 | videoAbuseUpdateValidator | 17 | videoAbuseUpdateValidator, |
18 | videoAbuseListValidator | ||
18 | } from '../../../middlewares' | 19 | } from '../../../middlewares' |
19 | import { AccountModel } from '../../../models/account/account' | 20 | import { AccountModel } from '../../../models/account/account' |
20 | import { VideoAbuseModel } from '../../../models/video/video-abuse' | 21 | import { VideoAbuseModel } from '../../../models/video/video-abuse' |
@@ -34,6 +35,7 @@ abuseVideoRouter.get('/abuse', | |||
34 | videoAbusesSortValidator, | 35 | videoAbusesSortValidator, |
35 | setDefaultSort, | 36 | setDefaultSort, |
36 | setDefaultPagination, | 37 | setDefaultPagination, |
38 | videoAbuseListValidator, | ||
37 | asyncMiddleware(listVideoAbuses) | 39 | asyncMiddleware(listVideoAbuses) |
38 | ) | 40 | ) |
39 | abuseVideoRouter.put('/:videoId/abuse/:id', | 41 | abuseVideoRouter.put('/:videoId/abuse/:id', |
@@ -70,7 +72,14 @@ async function listVideoAbuses (req: express.Request, res: express.Response) { | |||
70 | start: req.query.start, | 72 | start: req.query.start, |
71 | count: req.query.count, | 73 | count: req.query.count, |
72 | sort: req.query.sort, | 74 | sort: req.query.sort, |
75 | id: req.query.id, | ||
73 | search: req.query.search, | 76 | search: req.query.search, |
77 | state: req.query.state, | ||
78 | videoIs: req.query.videoIs, | ||
79 | searchReporter: req.query.searchReporter, | ||
80 | searchReportee: req.query.searchReportee, | ||
81 | searchVideo: req.query.searchVideo, | ||
82 | searchVideoChannel: req.query.searchVideoChannel, | ||
74 | serverAccountId: serverActor.Account.id, | 83 | serverAccountId: serverActor.Account.id, |
75 | user | 84 | user |
76 | }) | 85 | }) |