Convert real world script to typescript
[oweals/peertube.git] / server / tests / utils / video-blacklists.ts
1 import * as request from 'supertest'
2
3 function addVideoToBlacklist (url: string, token: string, videoId: number, specialStatus = 204) {
4   const path = '/api/v1/videos/' + videoId + '/blacklist'
5
6   return request(url)
7           .post(path)
8           .set('Accept', 'application/json')
9           .set('Authorization', 'Bearer ' + token)
10           .expect(specialStatus)
11 }
12
13 // ---------------------------------------------------------------------------
14
15 export {
16   addVideoToBlacklist
17 }