aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-19 14:58:16 +0100
committerChocobozzz <me@florianbigard.com>2022-01-19 14:58:16 +0100
commitd511df28906f84c7d25ecb24e41515ed549ff276 (patch)
treebc9caa33fae684e9971068011dd10243c7d0fe60 /shared
parent419b520ca4434d17f3505013174e195c3a316716 (diff)
downloadPeerTube-d511df28906f84c7d25ecb24e41515ed549ff276.tar.gz
PeerTube-d511df28906f84c7d25ecb24e41515ed549ff276.tar.zst
PeerTube-d511df28906f84c7d25ecb24e41515ed549ff276.zip
Add ability to filter my imports by target URL
Diffstat (limited to 'shared')
-rw-r--r--shared/server-commands/videos/imports-command.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/shared/server-commands/videos/imports-command.ts b/shared/server-commands/videos/imports-command.ts
index f63ed5d4b..c931ac481 100644
--- a/shared/server-commands/videos/imports-command.ts
+++ b/shared/server-commands/videos/imports-command.ts
@@ -56,18 +56,16 @@ export class ImportsCommand extends AbstractCommand {
56 56
57 getMyVideoImports (options: OverrideCommandOptions & { 57 getMyVideoImports (options: OverrideCommandOptions & {
58 sort?: string 58 sort?: string
59 targetUrl?: string
59 } = {}) { 60 } = {}) {
60 const { sort } = options 61 const { sort, targetUrl } = options
61 const path = '/api/v1/users/me/videos/imports' 62 const path = '/api/v1/users/me/videos/imports'
62 63
63 const query = {}
64 if (sort) query['sort'] = sort
65
66 return this.getRequestBody<ResultList<VideoImport>>({ 64 return this.getRequestBody<ResultList<VideoImport>>({
67 ...options, 65 ...options,
68 66
69 path, 67 path,
70 query: { sort }, 68 query: { sort, targetUrl },
71 implicitToken: true, 69 implicitToken: true,
72 defaultExpectedStatus: HttpStatusCode.OK_200 70 defaultExpectedStatus: HttpStatusCode.OK_200
73 }) 71 })