From 378557ef2584e334392193b63bb2108fac6741fc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Jan 2018 13:15:01 +0100 Subject: Fix comment creation --- server/models/video/video.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 4d15c2a50..918892938 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -507,6 +507,10 @@ export class VideoModel extends Model { return VideoModel.findById(id) } + static loadAndPopulateAccount (id: number) { + return VideoModel.scope([ ScopeNames.WITH_ACCOUNT_DETAILS ]).findById(id) + } + static loadByUrl (url: string, t?: Sequelize.Transaction) { const query: IFindOptions = { where: { -- cgit v1.2.3