]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/utils/videos/video-blacklist.ts
Add ability to unfederate a local video (on blacklist)
[github/Chocobozzz/PeerTube.git] / shared / utils / videos / video-blacklist.ts
index 2c176fde064c79126525c5b944dab43d41ae12dc..f2ae0ed26918ff5094c2b1d29f66373db4720bdf 100644 (file)
@@ -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)