From 5abb9fbbd12e7097e348d6a38622d364b1fa47ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 10 Jan 2019 15:39:51 +0100 Subject: Add ability to unfederate a local video (on blacklist) --- shared/utils/videos/video-blacklist.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'shared/utils/videos/video-blacklist.ts') 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 @@ import * as request from 'supertest' -function addVideoToBlacklist (url: string, token: string, videoId: number | string, reason?: string, specialStatus = 204) { +function addVideoToBlacklist ( + url: string, + token: string, + videoId: number | string, + reason?: string, + unfederate?: boolean, + specialStatus = 204 +) { const path = '/api/v1/videos/' + videoId + '/blacklist' return request(url) .post(path) - .send({ reason }) + .send({ reason, unfederate }) .set('Accept', 'application/json') .set('Authorization', 'Bearer ' + token) .expect(specialStatus) -- cgit v1.2.3