]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-share.ts
Add federation to ownership change
[github/Chocobozzz/PeerTube.git] / server / models / video / video-share.ts
index adadf5dea0b329dacd5468d399c42affe51ff419..fa9a70d509b42fccb99a59e8a10b9139a91f8b15 100644 (file)
@@ -99,7 +99,7 @@ export class VideoShareModel extends Model<VideoShareModel> {
   }
 
   static loadByUrl (url: string, t: Sequelize.Transaction) {
-    return VideoShareModel.scope(ScopeNames.WITH_ACTOR).findOne({
+    return VideoShareModel.scope(ScopeNames.FULL).findOne({
       where: {
         url
       },
@@ -190,8 +190,8 @@ export class VideoShareModel extends Model<VideoShareModel> {
 
   static listAndCountByVideoId (videoId: number, start: number, count: number, t?: Sequelize.Transaction) {
     const query = {
-      start,
-      count,
+      offset: start,
+      limit: count,
       where: {
         videoId
       },