X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Faccount%2Faccount-video-rate.ts;h=8aeb486d1fef684e65033d4028c1b500b649ad19;hb=8bb71f2e332726c207318e44b95e784f9740dc40;hp=a6edbeee8b2b8ac8a2d9e48077f9a7de468166fe;hpb=d5c8932a601c1854db0a2e399ccaf26e17385f1a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts index a6edbeee8..8aeb486d1 100644 --- a/server/models/account/account-video-rate.ts +++ b/server/models/account/account-video-rate.ts @@ -99,7 +99,7 @@ export class AccountVideoRateModel extends Model { static loadByAccountAndVideoOrUrl (accountId: number, videoId: number, url: string, t?: Transaction): Bluebird { const options: FindOptions = { where: { - [ Op.or]: [ + [Op.or]: [ { accountId, videoId @@ -116,10 +116,10 @@ export class AccountVideoRateModel extends Model { } static listByAccountForApi (options: { - start: number, - count: number, - sort: string, - type?: string, + start: number + count: number + sort: string + type?: string accountId: number }) { const query: FindOptions = { @@ -135,7 +135,7 @@ export class AccountVideoRateModel extends Model { required: true, include: [ { - model: VideoChannelModel.scope({ method: [VideoChannelScopeNames.SUMMARY, { withAccount: true } as SummaryOptions ] }), + model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, { withAccount: true } as SummaryOptions ] }), required: true } ] @@ -150,7 +150,7 @@ export class AccountVideoRateModel extends Model { static loadLocalAndPopulateVideo ( rateType: VideoRateType, accountName: string, - videoId: number, + videoId: number | string, t?: Transaction ): Bluebird { const options: FindOptions = {