diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-29 19:10:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-29 19:10:13 +0100 |
commit | c5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (patch) | |
tree | b8d287daca6c45305090cbec9da97d1155f275bd /client/src/app/shared/video | |
parent | 8b0d42ee372de6589796be26b83e5bffb1b69cdf (diff) | |
download | PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.gz PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.zst PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.zip |
Begin to add avatar to actors
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r-- | client/src/app/shared/video/abstract-video-list.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/video/video.model.ts | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index bfe46bcdd..354373776 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -83,7 +83,7 @@ export abstract class AbstractVideoList implements OnInit { | |||
83 | this.videos = this.videos.concat(videos) | 83 | this.videos = this.videos.concat(videos) |
84 | } | 84 | } |
85 | }, | 85 | }, |
86 | error => this.notificationsService.error('Error', error.text) | 86 | error => this.notificationsService.error('Error', error.message) |
87 | ) | 87 | ) |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index f159464c5..060bf933f 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -2,6 +2,7 @@ import { User } from '../' | |||
2 | import { Video as VideoServerModel } from '../../../../../shared' | 2 | import { Video as VideoServerModel } from '../../../../../shared' |
3 | import { Account } from '../../../../../shared/models/actors' | 3 | import { Account } from '../../../../../shared/models/actors' |
4 | import { environment } from '../../../environments/environment' | 4 | import { environment } from '../../../environments/environment' |
5 | import { getAbsoluteAPIUrl } from '../misc/utils' | ||
5 | 6 | ||
6 | export class Video implements VideoServerModel { | 7 | export class Video implements VideoServerModel { |
7 | accountName: string | 8 | accountName: string |
@@ -48,11 +49,7 @@ export class Video implements VideoServerModel { | |||
48 | } | 49 | } |
49 | 50 | ||
50 | constructor (hash: VideoServerModel) { | 51 | constructor (hash: VideoServerModel) { |
51 | let absoluteAPIUrl = environment.apiUrl | 52 | const absoluteAPIUrl = getAbsoluteAPIUrl() |
52 | if (!absoluteAPIUrl) { | ||
53 | // The API is on the same domain | ||
54 | absoluteAPIUrl = window.location.origin | ||
55 | } | ||
56 | 53 | ||
57 | this.accountName = hash.accountName | 54 | this.accountName = hash.accountName |
58 | this.createdAt = new Date(hash.createdAt.toString()) | 55 | this.createdAt = new Date(hash.createdAt.toString()) |