diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-06 11:35:56 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-04-08 10:07:53 +0200 |
commit | f479685678406a5df864d89615b33d29085ebfc6 (patch) | |
tree | 8de15e90cd8d97d8810715df8585c61f48d5282a /client/src/app/shared/shared-main/video-channel | |
parent | 968aaed2066873fc1c39f95168284122d9d15e21 (diff) | |
download | PeerTube-f479685678406a5df864d89615b33d29085ebfc6.tar.gz PeerTube-f479685678406a5df864d89615b33d29085ebfc6.tar.zst PeerTube-f479685678406a5df864d89615b33d29085ebfc6.zip |
Agnostic actor image storage
Diffstat (limited to 'client/src/app/shared/shared-main/video-channel')
-rw-r--r-- | client/src/app/shared/shared-main/video-channel/video-channel.model.ts | 4 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/video-channel/video-channel.service.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts index 126e43cea..b4c3365a9 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Account as ServerAccount, Avatar, VideoChannel as ServerVideoChannel, ViewsPerDate } from '@shared/models' | 1 | import { Account as ServerAccount, ActorImage, VideoChannel as ServerVideoChannel, ViewsPerDate } from '@shared/models' |
2 | import { Account } from '../account/account.model' | 2 | import { Account } from '../account/account.model' |
3 | import { Actor } from '../account/actor.model' | 3 | import { Actor } from '../account/actor.model' |
4 | 4 | ||
@@ -51,7 +51,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | updateAvatar (newAvatar: Avatar) { | 54 | updateAvatar (newAvatar: ActorImage) { |
55 | this.avatar = newAvatar | 55 | this.avatar = newAvatar |
56 | 56 | ||
57 | this.updateComputedAttributes() | 57 | this.updateComputedAttributes() |
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 eff3fad4d..3f9ef74fa 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,7 @@ 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 { Avatar, ResultList, VideoChannel as VideoChannelServer, VideoChannelCreate, VideoChannelUpdate } from '@shared/models' | 6 | import { ActorImage, ResultList, VideoChannel as VideoChannelServer, VideoChannelCreate, VideoChannelUpdate } from '@shared/models' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | import { Account } from '../account' | 8 | import { Account } from '../account' |
9 | import { AccountService } from '../account/account.service' | 9 | import { AccountService } from '../account/account.service' |
@@ -85,7 +85,7 @@ export class VideoChannelService { | |||
85 | changeVideoChannelAvatar (videoChannelName: string, avatarForm: FormData) { | 85 | changeVideoChannelAvatar (videoChannelName: string, avatarForm: FormData) { |
86 | const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/avatar/pick' | 86 | const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/avatar/pick' |
87 | 87 | ||
88 | return this.authHttp.post<{ avatar: Avatar }>(url, avatarForm) | 88 | return this.authHttp.post<{ avatar: ActorImage }>(url, avatarForm) |
89 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 89 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
90 | } | 90 | } |
91 | 91 | ||