X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-share.ts;h=fa9a70d509b42fccb99a59e8a10b9139a91f8b15;hb=5cf84858d49f4231cc4efec5e3132f17f65f6cf6;hp=adadf5dea0b329dacd5468d399c42affe51ff419;hpb=8fffe21a7bc96d08b229293d66ddba576e609790;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts index adadf5dea..fa9a70d50 100644 --- a/server/models/video/video-share.ts +++ b/server/models/video/video-share.ts @@ -99,7 +99,7 @@ export class VideoShareModel extends Model { } 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 { static listAndCountByVideoId (videoId: number, start: number, count: number, t?: Sequelize.Transaction) { const query = { - start, - count, + offset: start, + limit: count, where: { videoId },