aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-share.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-share.ts')
-rw-r--r--server/models/video/video-share.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts
index 602cc69b9..adadf5dea 100644
--- a/server/models/video/video-share.ts
+++ b/server/models/video/video-share.ts
@@ -187,4 +187,17 @@ export class VideoShareModel extends Model<VideoShareModel> {
187 .findAll(query) 187 .findAll(query)
188 .then(res => res.map(r => r.Actor)) 188 .then(res => res.map(r => r.Actor))
189 } 189 }
190
191 static listAndCountByVideoId (videoId: number, start: number, count: number, t?: Sequelize.Transaction) {
192 const query = {
193 start,
194 count,
195 where: {
196 videoId
197 },
198 transaction: t
199 }
200
201 return VideoShareModel.findAndCountAll(query)
202 }
190} 203}