From 6e46de095d7169355dd83030f6ce4a582304153a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Oct 2018 11:15:06 +0200 Subject: Add user history and resume videos --- server/tests/utils/videos/video-history.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/tests/utils/videos/video-history.ts (limited to 'server/tests/utils/videos/video-history.ts') diff --git a/server/tests/utils/videos/video-history.ts b/server/tests/utils/videos/video-history.ts new file mode 100644 index 000000000..7635478f7 --- /dev/null +++ b/server/tests/utils/videos/video-history.ts @@ -0,0 +1,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 +} -- cgit v1.2.3