PeerTube/server/tests/utils/videos/video-history.ts

15 lines
446 B
TypeScript
Raw Normal View History

2018-10-05 11:15:06 +02:00
import { makePutBodyRequest } from '../requests/requests'
function userWatchVideo (url: string, token: string, videoId: number | string, currentTime: number) {
const path = '/api/v1/videos/' + videoId + '/watching'
const fields = { currentTime }
return makePutBodyRequest({ url, path, token, fields, statusCodeExpected: 204 })
}
// ---------------------------------------------------------------------------
export {
userWatchVideo
}