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

Add ability to list imports of a channel sync

This commit is contained in:
Chocobozzz 2022-08-10 11:51:13 +02:00
parent 0567049a98
commit a3b472a12e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
37 changed files with 565 additions and 179 deletions

View file

@ -6,7 +6,8 @@ import {
VideoChannel,
VideoChannelCreate,
VideoChannelCreateResult,
VideoChannelUpdate
VideoChannelUpdate,
VideosImportInChannelCreate
} from '@shared/models'
import { unwrapBody } from '../requests'
import { AbstractCommand, OverrideCommandOptions } from '../shared'
@ -182,11 +183,10 @@ export class ChannelsCommand extends AbstractCommand {
})
}
importVideos (options: OverrideCommandOptions & {
importVideos (options: OverrideCommandOptions & VideosImportInChannelCreate & {
channelName: string
externalChannelUrl: string
}) {
const { channelName, externalChannelUrl } = options
const { channelName, externalChannelUrl, videoChannelSyncId } = options
const path = `/api/v1/video-channels/${channelName}/import-videos`
@ -194,7 +194,7 @@ export class ChannelsCommand extends AbstractCommand {
...options,
path,
fields: { externalChannelUrl },
fields: { externalChannelUrl, videoChannelSyncId },
implicitToken: true,
defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
})