aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/videos')
-rw-r--r--shared/server-commands/videos/history-command.ts19
1 files changed, 17 insertions, 2 deletions
diff --git a/shared/server-commands/videos/history-command.ts b/shared/server-commands/videos/history-command.ts
index 13b7150c1..e9dc63462 100644
--- a/shared/server-commands/videos/history-command.ts
+++ b/shared/server-commands/videos/history-command.ts
@@ -3,7 +3,7 @@ import { AbstractCommand, OverrideCommandOptions } from '../shared'
3 3
4export class HistoryCommand extends AbstractCommand { 4export class HistoryCommand extends AbstractCommand {
5 5
6 wathVideo (options: OverrideCommandOptions & { 6 watchVideo (options: OverrideCommandOptions & {
7 videoId: number | string 7 videoId: number | string
8 currentTime: number 8 currentTime: number
9 }) { 9 }) {
@@ -40,7 +40,22 @@ export class HistoryCommand extends AbstractCommand {
40 }) 40 })
41 } 41 }
42 42
43 remove (options: OverrideCommandOptions & { 43 removeElement (options: OverrideCommandOptions & {
44 videoId: number
45 }) {
46 const { videoId } = options
47 const path = '/api/v1/users/me/history/videos/' + videoId
48
49 return this.deleteRequest({
50 ...options,
51
52 path,
53 implicitToken: true,
54 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
55 })
56 }
57
58 removeAll (options: OverrideCommandOptions & {
44 beforeDate?: string 59 beforeDate?: string
45 } = {}) { 60 } = {}) {
46 const { beforeDate } = options 61 const { beforeDate } = options