aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/video-history.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/video-history.ts')
-rw-r--r--shared/extra-utils/videos/video-history.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/extra-utils/videos/video-history.ts b/shared/extra-utils/videos/video-history.ts
index dc7095b4d..2d751cf14 100644
--- a/shared/extra-utils/videos/video-history.ts
+++ b/shared/extra-utils/videos/video-history.ts
@@ -1,4 +1,5 @@
1import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests' 1import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests'
2import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
2 3
3function userWatchVideo (url: string, token: string, videoId: number | string, currentTime: number, statusCodeExpected = 204) { 4function userWatchVideo (url: string, token: string, videoId: number | string, currentTime: number, statusCodeExpected = 204) {
4 const path = '/api/v1/videos/' + videoId + '/watching' 5 const path = '/api/v1/videos/' + videoId + '/watching'
@@ -14,7 +15,7 @@ function listMyVideosHistory (url: string, token: string) {
14 url, 15 url,
15 path, 16 path,
16 token, 17 token,
17 statusCodeExpected: 200 18 statusCodeExpected: HttpStatusCode.OK_200
18 }) 19 })
19} 20}
20 21
@@ -26,7 +27,7 @@ function removeMyVideosHistory (url: string, token: string, beforeDate?: string)
26 path, 27 path,
27 token, 28 token,
28 fields: beforeDate ? { beforeDate } : {}, 29 fields: beforeDate ? { beforeDate } : {},
29 statusCodeExpected: 204 30 statusCodeExpected: HttpStatusCode.NO_CONTENT_204
30 }) 31 })
31} 32}
32 33