aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos/video-history.ts
blob: 7635478f770b39a7e9f1015a20ab4bf87c507899 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}