PeerTube/server/tests/utils/video-blacklists.ts

18 lines
484 B
TypeScript

import * as request from 'supertest'
function addVideoToBlacklist (url: string, token: string, videoId: number, specialStatus = 204) {
const path = '/api/v1/videos/' + videoId + '/blacklist'
return request(url)
.post(path)
.set('Accept', 'application/json')
.set('Authorization', 'Bearer ' + token)
.expect(specialStatus)
}
// ---------------------------------------------------------------------------
export {
addVideoToBlacklist
}