import { AccountVideoRate } from '../../../shared'
import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from '../video/video-channel'
import * as Bluebird from 'bluebird'
-import { MAccountVideoRate, MAccountVideoRateAccountUrl, MAccountVideoRateAccountVideo } from '@server/typings/models/video/video-rate'
+import {
+ MAccountVideoRate,
+ MAccountVideoRateAccountUrl,
+ MAccountVideoRateAccountVideo,
+ MAccountVideoRateFormattable
+} from '@server/typings/models/video/video-rate'
/*
Account rates per video.
static loadLocalAndPopulateVideo (
rateType: VideoRateType,
accountName: string,
- videoId: number,
+ videoId: number | string,
t?: Transaction
): Bluebird<MAccountVideoRateAccountVideo> {
const options: FindOptions = {
})
}
- toFormattedJSON (): AccountVideoRate {
+ toFormattedJSON (this: MAccountVideoRateFormattable): AccountVideoRate {
return {
video: this.Video.toFormattedJSON(),
rating: this.type