aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-11 09:57:19 +0200
committerChocobozzz <me@florianbigard.com>2021-06-11 09:57:19 +0200
commitca4b4b2e5590c1b37cff1fe1be7f797b93351229 (patch)
treee454de8be7b0dd6c28b08f27234fe6992ab9929c /server/models
parent1d43c3a613c72d69f7360fee9e5bfe6f662d62f7 (diff)
downloadPeerTube-ca4b4b2e5590c1b37cff1fe1be7f797b93351229.tar.gz
PeerTube-ca4b4b2e5590c1b37cff1fe1be7f797b93351229.tar.zst
PeerTube-ca4b4b2e5590c1b37cff1fe1be7f797b93351229.zip
Fetch directly all video attributes for get API
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 9d56eb13c..00fbb18f6 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1472,13 +1472,13 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1472 1472
1473 static loadForGetAPI (parameters: { 1473 static loadForGetAPI (parameters: {
1474 id: number | string 1474 id: number | string
1475 t?: Transaction 1475 transaction?: Transaction
1476 userId?: number 1476 userId?: number
1477 }): Promise<MVideoDetails> { 1477 }): Promise<MVideoDetails> {
1478 const { id, t, userId } = parameters 1478 const { id, transaction, userId } = parameters
1479 const queryBuilder = new VideosModelGetQueryBuilder(VideoModel.sequelize) 1479 const queryBuilder = new VideosModelGetQueryBuilder(VideoModel.sequelize)
1480 1480
1481 return queryBuilder.queryVideos({ id, transaction: t, forGetAPI: true, userId }) 1481 return queryBuilder.queryVideos({ id, transaction, forGetAPI: true, userId })
1482 } 1482 }
1483 1483
1484 static async getStats () { 1484 static async getStats () {