1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add ability to filter my imports by target URL

This commit is contained in:
Chocobozzz 2022-01-19 14:58:16 +01:00
parent 419b520ca4
commit d511df2890
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 59 additions and 20 deletions

View file

@ -56,18 +56,16 @@ export class ImportsCommand extends AbstractCommand {
getMyVideoImports (options: OverrideCommandOptions & {
sort?: string
targetUrl?: string
} = {}) {
const { sort } = options
const { sort, targetUrl } = options
const path = '/api/v1/users/me/videos/imports'
const query = {}
if (sort) query['sort'] = sort
return this.getRequestBody<ResultList<VideoImport>>({
...options,
path,
query: { sort },
query: { sort, targetUrl },
implicitToken: true,
defaultExpectedStatus: HttpStatusCode.OK_200
})