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 /client/src/app/shared/shared-main/video-channel | |
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 'client/src/app/shared/shared-main/video-channel')
-rw-r--r-- | client/src/app/shared/shared-main/video-channel/video-channel.service.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts index fa97025ac..5e3985526 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts | |||
@@ -3,7 +3,14 @@ import { catchError, map, tap } from 'rxjs/operators' | |||
3 | import { HttpClient, HttpParams } from '@angular/common/http' | 3 | import { HttpClient, HttpParams } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' | 5 | import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' |
6 | import { ActorImage, ResultList, VideoChannel as VideoChannelServer, VideoChannelCreate, VideoChannelUpdate } from '@shared/models' | 6 | import { |
7 | ActorImage, | ||
8 | ResultList, | ||
9 | VideoChannel as VideoChannelServer, | ||
10 | VideoChannelCreate, | ||
11 | VideoChannelUpdate, | ||
12 | VideosImportInChannelCreate | ||
13 | } from '@shared/models' | ||
7 | import { environment } from '../../../../environments/environment' | 14 | import { environment } from '../../../../environments/environment' |
8 | import { Account } from '../account' | 15 | import { Account } from '../account' |
9 | import { AccountService } from '../account/account.service' | 16 | import { AccountService } from '../account/account.service' |
@@ -96,9 +103,15 @@ export class VideoChannelService { | |||
96 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 103 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
97 | } | 104 | } |
98 | 105 | ||
99 | importVideos (videoChannelName: string, externalChannelUrl: string) { | 106 | importVideos (videoChannelName: string, externalChannelUrl: string, syncId?: number) { |
100 | const path = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/import-videos' | 107 | const path = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/import-videos' |
101 | return this.authHttp.post(path, { externalChannelUrl }) | 108 | |
109 | const body: VideosImportInChannelCreate = { | ||
110 | externalChannelUrl, | ||
111 | videoChannelSyncId: syncId | ||
112 | } | ||
113 | |||
114 | return this.authHttp.post(path, body) | ||
102 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 115 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
103 | } | 116 | } |
104 | } | 117 | } |