aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/videos
diff options
context:
space:
mode:
Diffstat (limited to 'shared/utils/videos')
-rw-r--r--shared/utils/videos/video-blacklist.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/shared/utils/videos/video-blacklist.ts b/shared/utils/videos/video-blacklist.ts
index 2c176fde0..f2ae0ed26 100644
--- a/shared/utils/videos/video-blacklist.ts
+++ b/shared/utils/videos/video-blacklist.ts
@@ -1,11 +1,18 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2 2
3function addVideoToBlacklist (url: string, token: string, videoId: number | string, reason?: string, specialStatus = 204) { 3function addVideoToBlacklist (
4 url: string,
5 token: string,
6 videoId: number | string,
7 reason?: string,
8 unfederate?: boolean,
9 specialStatus = 204
10) {
4 const path = '/api/v1/videos/' + videoId + '/blacklist' 11 const path = '/api/v1/videos/' + videoId + '/blacklist'
5 12
6 return request(url) 13 return request(url)
7 .post(path) 14 .post(path)
8 .send({ reason }) 15 .send({ reason, unfederate })
9 .set('Accept', 'application/json') 16 .set('Accept', 'application/json')
10 .set('Authorization', 'Bearer ' + token) 17 .set('Authorization', 'Bearer ' + token)
11 .expect(specialStatus) 18 .expect(specialStatus)