]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/extra-utils/server/clients.ts
Introduce blacklist command
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / clients.ts
1 import * as request from 'supertest'
2 import { URL } from 'url'
3 import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
4
5 function getClient (url: string) {
6 const path = '/api/v1/oauth-clients/local'
7
8 return request(url)
9 .get(path)
10 .set('Host', new URL(url).host)
11 .set('Accept', 'application/json')
12 .expect(HttpStatusCode.OK_200)
13 .expect('Content-Type', /json/)
14 }
15
16 // ---------------------------------------------------------------------------
17
18 export {
19 getClient
20 }