mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Change api output for videos
This commit is contained in:
parent
f0f5567b69
commit
2df82d42cb
8 changed files with 87 additions and 29 deletions
|
@ -9,6 +9,7 @@ const request = require('supertest')
|
|||
const testUtils = {
|
||||
flushTests: flushTests,
|
||||
getFriendsList: getFriendsList,
|
||||
getVideo: getVideo,
|
||||
getVideosList: getVideosList,
|
||||
makeFriends: makeFriends,
|
||||
quitFriends: quitFriends,
|
||||
|
@ -36,6 +37,17 @@ function getFriendsList (url, end) {
|
|||
.end(end)
|
||||
}
|
||||
|
||||
function getVideo (url, id, end) {
|
||||
const path = '/api/v1/videos/' + id
|
||||
|
||||
request(url)
|
||||
.get(path)
|
||||
.set('Accept', 'application/json')
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.end(end)
|
||||
}
|
||||
|
||||
function getVideosList (url, end) {
|
||||
const path = '/api/v1/videos'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue