From 15a7eafb892441957ba7dd6fcbf556086fe5b2b3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 26 Jul 2021 15:04:37 +0200 Subject: Refactor video links builders --- client/src/app/shared/shared-main/video/video.model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/shared-main/video/video.model.ts') diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index f0a4a3f37..b7720c8d2 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts @@ -2,6 +2,7 @@ import { AuthUser } from '@app/core' import { User } from '@app/core/users/user.model' import { durationToString, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' import { Actor } from '@app/shared/shared-main/account/actor.model' +import { buildVideoWatchPath } from '@shared/core-utils' import { peertubeTranslate } from '@shared/core-utils/i18n' import { ActorImage, @@ -92,7 +93,7 @@ export class Video implements VideoServerModel { pluginData?: any static buildWatchUrl (video: Partial>) { - return '/w/' + (video.shortUUID || video.uuid) + return buildVideoWatchPath({ shortUUID: video.shortUUID || video.uuid }) } static buildUpdateUrl (video: Pick) { -- cgit v1.2.3