aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/video-channel/video-channel.service.ts')
-rw-r--r--client/src/app/shared/shared-main/video-channel/video-channel.service.ts20
1 files changed, 4 insertions, 16 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 dc00fabdc..f37f13c51 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
@@ -69,18 +69,12 @@ export class VideoChannelService {
69 69
70 createVideoChannel (videoChannel: VideoChannelCreate) { 70 createVideoChannel (videoChannel: VideoChannelCreate) {
71 return this.authHttp.post(VideoChannelService.BASE_VIDEO_CHANNEL_URL, videoChannel) 71 return this.authHttp.post(VideoChannelService.BASE_VIDEO_CHANNEL_URL, videoChannel)
72 .pipe( 72 .pipe(catchError(err => this.restExtractor.handleError(err)))
73 map(this.restExtractor.extractDataBool),
74 catchError(err => this.restExtractor.handleError(err))
75 )
76 } 73 }
77 74
78 updateVideoChannel (videoChannelName: string, videoChannel: VideoChannelUpdate) { 75 updateVideoChannel (videoChannelName: string, videoChannel: VideoChannelUpdate) {
79 return this.authHttp.put(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName, videoChannel) 76 return this.authHttp.put(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName, videoChannel)
80 .pipe( 77 .pipe(catchError(err => this.restExtractor.handleError(err)))
81 map(this.restExtractor.extractDataBool),
82 catchError(err => this.restExtractor.handleError(err))
83 )
84 } 78 }
85 79
86 changeVideoChannelImage (videoChannelName: string, avatarForm: FormData, type: 'avatar' | 'banner') { 80 changeVideoChannelImage (videoChannelName: string, avatarForm: FormData, type: 'avatar' | 'banner') {
@@ -94,17 +88,11 @@ export class VideoChannelService {
94 const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/' + type 88 const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/' + type
95 89
96 return this.authHttp.delete(url) 90 return this.authHttp.delete(url)
97 .pipe( 91 .pipe(catchError(err => this.restExtractor.handleError(err)))
98 map(this.restExtractor.extractDataBool),
99 catchError(err => this.restExtractor.handleError(err))
100 )
101 } 92 }
102 93
103 removeVideoChannel (videoChannel: VideoChannel) { 94 removeVideoChannel (videoChannel: VideoChannel) {
104 return this.authHttp.delete(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.nameWithHost) 95 return this.authHttp.delete(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.nameWithHost)
105 .pipe( 96 .pipe(catchError(err => this.restExtractor.handleError(err)))
106 map(this.restExtractor.extractDataBool),
107 catchError(err => this.restExtractor.handleError(err))
108 )
109 } 97 }
110} 98}