From c5911fd347c76e8bdc05ea9f3ee9efed4a58c236 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Dec 2017 19:10:13 +0100 Subject: Begin to add avatar to actors --- client/src/app/shared/video/video.model.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/video/video.model.ts') 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 '../' import { Video as VideoServerModel } from '../../../../../shared' import { Account } from '../../../../../shared/models/actors' import { environment } from '../../../environments/environment' +import { getAbsoluteAPIUrl } from '../misc/utils' export class Video implements VideoServerModel { accountName: string @@ -48,11 +49,7 @@ export class Video implements VideoServerModel { } constructor (hash: VideoServerModel) { - let absoluteAPIUrl = environment.apiUrl - if (!absoluteAPIUrl) { - // The API is on the same domain - absoluteAPIUrl = window.location.origin - } + const absoluteAPIUrl = getAbsoluteAPIUrl() this.accountName = hash.accountName this.createdAt = new Date(hash.createdAt.toString()) -- cgit v1.2.3