X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fvideos%2Fvideo-blacklist.ts;h=ba139ef95269ad7c682c62772098ccd9954e9f9d;hb=714bfcc556177dce2b65a1e58babdf2488e9de13;hp=e25a292fc73abf17962eff168643e282e69f8d45;hpb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/videos/video-blacklist.ts b/shared/extra-utils/videos/video-blacklist.ts index e25a292fc..ba139ef95 100644 --- a/shared/extra-utils/videos/video-blacklist.ts +++ b/shared/extra-utils/videos/video-blacklist.ts @@ -13,11 +13,11 @@ function addVideoToBlacklist ( const path = '/api/v1/videos/' + videoId + '/blacklist' return request(url) - .post(path) - .send({ reason, unfederate }) - .set('Accept', 'application/json') - .set('Authorization', 'Bearer ' + token) - .expect(specialStatus) + .post(path) + .send({ reason, unfederate }) + .set('Accept', 'application/json') + .set('Authorization', 'Bearer ' + token) + .expect(specialStatus) } function updateVideoBlacklist (url: string, token: string, videoId: number, reason?: string, specialStatus = 204) { @@ -35,20 +35,20 @@ function removeVideoFromBlacklist (url: string, token: string, videoId: number | const path = '/api/v1/videos/' + videoId + '/blacklist' return request(url) - .delete(path) - .set('Accept', 'application/json') - .set('Authorization', 'Bearer ' + token) - .expect(specialStatus) + .delete(path) + .set('Accept', 'application/json') + .set('Authorization', 'Bearer ' + token) + .expect(specialStatus) } function getBlacklistedVideosList (parameters: { - url: string, - token: string, - sort?: string, - type?: VideoBlacklistType, + url: string + token: string + sort?: string + type?: VideoBlacklistType specialStatus?: number }) { - let { url, token, sort, type, specialStatus = 200 } = parameters + const { url, token, sort, type, specialStatus = 200 } = parameters const path = '/api/v1/videos/blacklist/' const query = { sort, type }