diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-18 11:37:29 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-18 11:37:29 +0100 |
commit | e8bffe9690307f2686ed5573cae2b86ee5f57789 (patch) | |
tree | e6268124e5e9c22eb465d94ad638ed8443bc9743 /client/src/app/shared/shared-main/video/video-ownership.service.ts | |
parent | c1f7a737cfe174ff1648f269a62540826d0e8089 (diff) | |
download | PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.tar.gz PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.tar.zst PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.zip |
Remove unnecessary function
Diffstat (limited to 'client/src/app/shared/shared-main/video/video-ownership.service.ts')
-rw-r--r-- | client/src/app/shared/shared-main/video/video-ownership.service.ts | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/client/src/app/shared/shared-main/video/video-ownership.service.ts b/client/src/app/shared/shared-main/video/video-ownership.service.ts index 273930a6c..bc0e1b1d1 100644 --- a/client/src/app/shared/shared-main/video/video-ownership.service.ts +++ b/client/src/app/shared/shared-main/video/video-ownership.service.ts | |||
@@ -25,10 +25,7 @@ export class VideoOwnershipService { | |||
25 | } | 25 | } |
26 | 26 | ||
27 | return this.authHttp.post(url, body) | 27 | return this.authHttp.post(url, body) |
28 | .pipe( | 28 | .pipe(catchError(res => this.restExtractor.handleError(res))) |
29 | map(this.restExtractor.extractDataBool), | ||
30 | catchError(res => this.restExtractor.handleError(res)) | ||
31 | ) | ||
32 | } | 29 | } |
33 | 30 | ||
34 | getOwnershipChanges (pagination: RestPagination, sort: SortMeta): Observable<ResultList<VideoChangeOwnership>> { | 31 | getOwnershipChanges (pagination: RestPagination, sort: SortMeta): Observable<ResultList<VideoChangeOwnership>> { |
@@ -47,18 +44,12 @@ export class VideoOwnershipService { | |||
47 | acceptOwnership (id: number, input: VideoChangeOwnershipAccept) { | 44 | acceptOwnership (id: number, input: VideoChangeOwnershipAccept) { |
48 | const url = VideoOwnershipService.BASE_VIDEO_CHANGE_OWNERSHIP_URL + 'ownership/' + id + '/accept' | 45 | const url = VideoOwnershipService.BASE_VIDEO_CHANGE_OWNERSHIP_URL + 'ownership/' + id + '/accept' |
49 | return this.authHttp.post(url, input) | 46 | return this.authHttp.post(url, input) |
50 | .pipe( | 47 | .pipe(catchError(this.restExtractor.handleError)) |
51 | map(this.restExtractor.extractDataBool), | ||
52 | catchError(this.restExtractor.handleError) | ||
53 | ) | ||
54 | } | 48 | } |
55 | 49 | ||
56 | refuseOwnership (id: number) { | 50 | refuseOwnership (id: number) { |
57 | const url = VideoOwnershipService.BASE_VIDEO_CHANGE_OWNERSHIP_URL + 'ownership/' + id + '/refuse' | 51 | const url = VideoOwnershipService.BASE_VIDEO_CHANGE_OWNERSHIP_URL + 'ownership/' + id + '/refuse' |
58 | return this.authHttp.post(url, {}) | 52 | return this.authHttp.post(url, {}) |
59 | .pipe( | 53 | .pipe(catchError(this.restExtractor.handleError)) |
60 | map(this.restExtractor.extractDataBool), | ||
61 | catchError(this.restExtractor.handleError) | ||
62 | ) | ||
63 | } | 54 | } |
64 | } | 55 | } |