From 1e1265b36c09df1465aa2b4866815c957b6a532e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Nov 2017 09:31:41 +0100 Subject: Make the client compile too --- client/src/app/videos/shared/video-details.model.ts | 6 +++--- client/src/app/videos/shared/video.model.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'client/src/app/videos/shared') diff --git a/client/src/app/videos/shared/video-details.model.ts b/client/src/app/videos/shared/video-details.model.ts index 84f96a25f..f4ae64dc1 100644 --- a/client/src/app/videos/shared/video-details.model.ts +++ b/client/src/app/videos/shared/video-details.model.ts @@ -10,7 +10,7 @@ import { } from '../../../../../shared' export class VideoDetails extends Video implements VideoDetailsServerModel { - author: string + account: string by: string createdAt: Date updatedAt: Date @@ -71,7 +71,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { } isRemovableBy (user: AuthUser) { - return user && this.isLocal === true && (this.author === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO)) + return user && this.isLocal === true && (this.account === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO)) } isBlackistableBy (user: AuthUser) { @@ -79,6 +79,6 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { } isUpdatableBy (user: AuthUser) { - return user && this.isLocal === true && user.username === this.author + return user && this.isLocal === true && user.username === this.account } } diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts index 7f2871032..2cad4a04e 100644 --- a/client/src/app/videos/shared/video.model.ts +++ b/client/src/app/videos/shared/video.model.ts @@ -2,7 +2,7 @@ import { Video as VideoServerModel } from '../../../../../shared' import { User } from '../../shared' export class Video implements VideoServerModel { - author: string + account: string by: string createdAt: Date updatedAt: Date @@ -32,8 +32,8 @@ export class Video implements VideoServerModel { dislikes: number nsfw: boolean - private static createByString (author: string, podHost: string) { - return author + '@' + podHost + private static createByString (account: string, podHost: string) { + return account + '@' + podHost } private static createDurationString (duration: number) { @@ -52,7 +52,7 @@ export class Video implements VideoServerModel { absoluteAPIUrl = window.location.origin } - this.author = hash.author + this.account = hash.account this.createdAt = new Date(hash.createdAt.toString()) this.categoryLabel = hash.categoryLabel this.category = hash.category @@ -80,7 +80,7 @@ export class Video implements VideoServerModel { this.dislikes = hash.dislikes this.nsfw = hash.nsfw - this.by = Video.createByString(hash.author, hash.podHost) + this.by = Video.createByString(hash.account, hash.podHost) } isVideoNSFWForUser (user: User) { -- cgit v1.2.3