From ad9e39fb815d85e5e718c40540fa75471474fa17 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 May 2018 09:57:16 +0200 Subject: Only use account name in routes --- client/src/app/shared/video/video-details.model.ts | 4 ++-- client/src/app/shared/video/video-miniature.component.html | 4 ++-- client/src/app/shared/video/video.service.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index 5397aa37f..5fc55fca6 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts @@ -1,7 +1,7 @@ import { UserRight, VideoChannel, VideoDetails as VideoDetailsServerModel, VideoFile } from '../../../../../shared' -import { Account } from '../../../../../shared/models/actors' import { AuthUser } from '../../core' import { Video } from '../../shared/video/video.model' +import { Account } from '@app/shared/account/account.model' export class VideoDetails extends Video implements VideoDetailsServerModel { descriptionPath: string @@ -21,7 +21,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { this.descriptionPath = hash.descriptionPath this.files = hash.files this.channel = hash.channel - this.account = hash.account + this.account = new Account(hash.account) this.tags = hash.tags this.support = hash.support this.commentsEnabled = hash.commentsEnabled diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 1725e9f5c..09ce0ef7f 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html @@ -6,10 +6,10 @@ class="video-miniature-name" [routerLink]="[ '/videos/watch', video.uuid ]" [attr.title]="video.name" [ngClass]="{ 'blur-filter': isVideoBlur() }" > - {{ video.name }} + {{ video.name }} {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views - {{ video.by }} + {{ video.by }} diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 5b8e2467a..d1e32faeb 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -120,7 +120,7 @@ export class VideoService { params = this.restService.addRestGetParams(params, pagination, sort) return this.authHttp - .get(AccountService.BASE_ACCOUNT_URL + account.id + '/videos', { params }) + .get(AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/videos', { params }) .pipe( map(this.extractVideos), catchError(res => this.restExtractor.handleError(res)) -- cgit v1.2.3