aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-channel/video-channel.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video-channel/video-channel.service.ts')
-rw-r--r--client/src/app/shared/video-channel/video-channel.service.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/app/shared/video-channel/video-channel.service.ts b/client/src/app/shared/video-channel/video-channel.service.ts
index 55e4c2a31..0b9900208 100644
--- a/client/src/app/shared/video-channel/video-channel.service.ts
+++ b/client/src/app/shared/video-channel/video-channel.service.ts
@@ -9,6 +9,7 @@ import { ResultList } from '../../../../../shared'
9import { VideoChannel } from './video-channel.model' 9import { VideoChannel } from './video-channel.model'
10import { environment } from '../../../environments/environment' 10import { environment } from '../../../environments/environment'
11import { Account } from '@app/shared/account/account.model' 11import { Account } from '@app/shared/account/account.model'
12import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
12 13
13@Injectable() 14@Injectable()
14export class VideoChannelService { 15export class VideoChannelService {
@@ -54,6 +55,13 @@ export class VideoChannelService {
54 ) 55 )
55 } 56 }
56 57
58 changeVideoChannelAvatar (videoChannelUUID: string, avatarForm: FormData) {
59 const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelUUID + '/avatar/pick'
60
61 return this.authHttp.post<{ avatar: Avatar }>(url, avatarForm)
62 .pipe(catchError(this.restExtractor.handleError))
63 }
64
57 removeVideoChannel (videoChannel: VideoChannel) { 65 removeVideoChannel (videoChannel: VideoChannel) {
58 return this.authHttp.delete(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.uuid) 66 return this.authHttp.delete(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.uuid)
59 .pipe( 67 .pipe(