]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/video-channel/video-channel.service.ts
Channel sync (#5135)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video-channel / video-channel.service.ts
index 480d250fb82b257f5022ca144a1c55ef1e582c79..fa97025acb7fb6628b9ef54906ac93a2b6eaf98a 100644 (file)
@@ -95,4 +95,10 @@ export class VideoChannelService {
     return this.authHttp.delete(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.nameWithHost)
                .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
+
+  importVideos (videoChannelName: string, externalChannelUrl: string) {
+    const path = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/import-videos'
+    return this.authHttp.post(path, { externalChannelUrl })
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
+  }
 }