From 76d36e0b355f41fb46709ba5e39c59b10087c6a9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Jan 2018 10:35:54 +0100 Subject: Refractor account by --- .../app/videos/+video-watch/comment/video-comment.model.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'client/src/app/videos/+video-watch/comment') diff --git a/client/src/app/videos/+video-watch/comment/video-comment.model.ts b/client/src/app/videos/+video-watch/comment/video-comment.model.ts index abecae303..4c5971f54 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.model.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.model.ts @@ -1,4 +1,5 @@ -import { Account } from '../../../../../../shared/models/actors' +import { Account } from '@app/shared/account/account.model' +import { Account as AccountInterface } from '../../../../../../shared/models/actors' import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model' export class VideoComment implements VideoCommentServerModel { @@ -10,15 +11,11 @@ export class VideoComment implements VideoCommentServerModel { videoId: number createdAt: Date | string updatedAt: Date | string - account: Account + account: AccountInterface totalReplies: number by: string - private static createByString (account: string, serverHost: string) { - return account + '@' + serverHost - } - constructor (hash: VideoCommentServerModel) { this.id = hash.id this.url = hash.url @@ -31,6 +28,6 @@ export class VideoComment implements VideoCommentServerModel { this.account = hash.account this.totalReplies = hash.totalReplies - this.by = VideoComment.createByString(this.account.name, this.account.host) + this.by = Account.CREATE_BY_STRING(this.account.name, this.account.host) } } -- cgit v1.2.3