aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos/imports-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/videos/imports-command.ts')
-rw-r--r--shared/server-commands/videos/imports-command.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/shared/server-commands/videos/imports-command.ts b/shared/server-commands/videos/imports-command.ts
index e4944694d..f63ed5d4b 100644
--- a/shared/server-commands/videos/imports-command.ts
+++ b/shared/server-commands/videos/imports-command.ts
@@ -26,6 +26,34 @@ export class ImportsCommand extends AbstractCommand {
26 })) 26 }))
27 } 27 }
28 28
29 delete (options: OverrideCommandOptions & {
30 importId: number
31 }) {
32 const path = '/api/v1/videos/imports/' + options.importId
33
34 return this.deleteRequest({
35 ...options,
36
37 path,
38 implicitToken: true,
39 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
40 })
41 }
42
43 cancel (options: OverrideCommandOptions & {
44 importId: number
45 }) {
46 const path = '/api/v1/videos/imports/' + options.importId + '/cancel'
47
48 return this.postBodyRequest({
49 ...options,
50
51 path,
52 implicitToken: true,
53 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
54 })
55 }
56
29 getMyVideoImports (options: OverrideCommandOptions & { 57 getMyVideoImports (options: OverrideCommandOptions & {
30 sort?: string 58 sort?: string
31 } = {}) { 59 } = {}) {