X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Futils%2Fvideos%2Fvideo-blacklist.ts;h=f2ae0ed26918ff5094c2b1d29f66373db4720bdf;hb=5abb9fbbd12e7097e348d6a38622d364b1fa47ed;hp=2c176fde064c79126525c5b944dab43d41ae12dc;hpb=93f85e90ffa27453e2c909406b62bef65963b8ad;p=github%2FChocobozzz%2FPeerTube.git 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)