PeerTube_original/shared/utils/videos/video-history.ts
buoyantair 9639bd1757 Move utils to /shared
Move utils used by /server/tools/* & /server/tests/**/* into
/shared folder.

Issue: #1336
2018-10-29 22:18:31 +05:30

15 lines
446 B
TypeScript

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
}