diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-10 11:51:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-10 14:32:00 +0200 |
commit | a3b472a12ec6e57dbe2f650419f8064864686eab (patch) | |
tree | f36559488e34493c029b686772e986902150a647 /shared/server-commands/videos/channels-command.ts | |
parent | 0567049a9819d67070aa6d548a75a7e632a4aaa4 (diff) | |
download | PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.tar.gz PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.tar.zst PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.zip |
Add ability to list imports of a channel sync
Diffstat (limited to 'shared/server-commands/videos/channels-command.ts')
-rw-r--r-- | shared/server-commands/videos/channels-command.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shared/server-commands/videos/channels-command.ts b/shared/server-commands/videos/channels-command.ts index a688a120f..385d0fe73 100644 --- a/shared/server-commands/videos/channels-command.ts +++ b/shared/server-commands/videos/channels-command.ts | |||
@@ -6,7 +6,8 @@ import { | |||
6 | VideoChannel, | 6 | VideoChannel, |
7 | VideoChannelCreate, | 7 | VideoChannelCreate, |
8 | VideoChannelCreateResult, | 8 | VideoChannelCreateResult, |
9 | VideoChannelUpdate | 9 | VideoChannelUpdate, |
10 | VideosImportInChannelCreate | ||
10 | } from '@shared/models' | 11 | } from '@shared/models' |
11 | import { unwrapBody } from '../requests' | 12 | import { unwrapBody } from '../requests' |
12 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 13 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
@@ -182,11 +183,10 @@ export class ChannelsCommand extends AbstractCommand { | |||
182 | }) | 183 | }) |
183 | } | 184 | } |
184 | 185 | ||
185 | importVideos (options: OverrideCommandOptions & { | 186 | importVideos (options: OverrideCommandOptions & VideosImportInChannelCreate & { |
186 | channelName: string | 187 | channelName: string |
187 | externalChannelUrl: string | ||
188 | }) { | 188 | }) { |
189 | const { channelName, externalChannelUrl } = options | 189 | const { channelName, externalChannelUrl, videoChannelSyncId } = options |
190 | 190 | ||
191 | const path = `/api/v1/video-channels/${channelName}/import-videos` | 191 | const path = `/api/v1/video-channels/${channelName}/import-videos` |
192 | 192 | ||
@@ -194,7 +194,7 @@ export class ChannelsCommand extends AbstractCommand { | |||
194 | ...options, | 194 | ...options, |
195 | 195 | ||
196 | path, | 196 | path, |
197 | fields: { externalChannelUrl }, | 197 | fields: { externalChannelUrl, videoChannelSyncId }, |
198 | implicitToken: true, | 198 | implicitToken: true, |
199 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 | 199 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 |
200 | }) | 200 | }) |