From d7df188f23bb3c4773ac26e6fa8b3d82b1229e6d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 25 Feb 2021 11:17:53 +0100 Subject: Fix separate SQL query for video get --- server/models/account/user.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/models/account') diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 534898f96..0834ecfa5 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -28,7 +28,8 @@ import { MUserFormattable, MUserNotifSettingChannelDefault, MUserWithNotificationSetting, - MVideoFullLight + MVideoFullLight, + MVideoWithRights } from '@server/types/models' import { hasUserRight, USER_ROLE_LABELS } from '../../../shared/core-utils/users' import { AbuseState, MyUser, UserRight, VideoPlaylistType, VideoPrivacy } from '../../../shared/models' @@ -819,7 +820,7 @@ export class UserModel extends Model { .then(u => u.map(u => u.username)) } - canGetVideo (video: MVideoFullLight) { + canGetVideo (video: MVideoWithRights) { const videoUserId = video.VideoChannel.Account.userId if (video.isBlacklisted()) { -- cgit v1.2.3