aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-channel
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-29 14:34:04 +0200
committerChocobozzz <me@florianbigard.com>2018-06-29 14:34:04 +0200
commit52d9f792b3fee5acce80f948295b59e3ad2073eb (patch)
tree661f577e9c7196d199b4b49e475ecd2d88e6d7b7 /client/src/app/shared/video-channel
parent4bbfc6c606c8d3794bae25c64c516120af41f4eb (diff)
downloadPeerTube-52d9f792b3fee5acce80f948295b59e3ad2073eb.tar.gz
PeerTube-52d9f792b3fee5acce80f948295b59e3ad2073eb.tar.zst
PeerTube-52d9f792b3fee5acce80f948295b59e3ad2073eb.zip
Client: Add ability to update video channel avatar
Diffstat (limited to 'client/src/app/shared/video-channel')
-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(