aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-08 13:15:01 +0100
committerChocobozzz <me@florianbigard.com>2018-01-08 13:15:01 +0100
commit378557ef2584e334392193b63bb2108fac6741fc (patch)
tree3d9792af5b11980bbf47fd964fef61e4237a8461 /server/models/video/video.ts
parent9273b2d8ff479aef0e29c46deba2f05ab7075517 (diff)
downloadPeerTube-378557ef2584e334392193b63bb2108fac6741fc.tar.gz
PeerTube-378557ef2584e334392193b63bb2108fac6741fc.tar.zst
PeerTube-378557ef2584e334392193b63bb2108fac6741fc.zip
Fix comment creation
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts4
1 files changed, 4 insertions, 0 deletions
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<VideoModel> {
507 return VideoModel.findById(id) 507 return VideoModel.findById(id)
508 } 508 }
509 509
510 static loadAndPopulateAccount (id: number) {
511 return VideoModel.scope([ ScopeNames.WITH_ACCOUNT_DETAILS ]).findById(id)
512 }
513
510 static loadByUrl (url: string, t?: Sequelize.Transaction) { 514 static loadByUrl (url: string, t?: Sequelize.Transaction) {
511 const query: IFindOptions<VideoModel> = { 515 const query: IFindOptions<VideoModel> = {
512 where: { 516 where: {