MAccountVideoRateAccountUrl,
MAccountVideoRateAccountVideo,
MAccountVideoRateFormattable
-} from '@server/typings/models/video/video-rate'
+} from '@server/types/models/video/video-rate'
/*
Account rates per video.
static loadByAccountAndVideoOrUrl (accountId: number, videoId: number, url: string, t?: Transaction): Bluebird<MAccountVideoRate> {
const options: FindOptions = {
where: {
- [ Op.or]: [
+ [Op.or]: [
{
accountId,
videoId
}
static listByAccountForApi (options: {
- start: number,
- count: number,
- sort: string,
- type?: string,
+ start: number
+ count: number
+ sort: string
+ type?: string
accountId: number
}) {
const query: FindOptions = {
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
}
]
static loadLocalAndPopulateVideo (
rateType: VideoRateType,
accountName: string,
- videoId: number,
+ videoId: number | string,
t?: Transaction
): Bluebird<MAccountVideoRateAccountVideo> {
const options: FindOptions = {