X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fuser%2Fuser-video-rate-interface.ts;h=ea0fdc4d91e28144590e23ff2826d5cc60601b9e;hb=556ddc319242aafef51bae9301423ecf8701a3af;hp=a726639b1e7578b347cb13c68bcd2db6cc1f4d90;hpb=ee9e7b61f59a427208386738057c8eff48fba599;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/user/user-video-rate-interface.ts b/server/models/user/user-video-rate-interface.ts index a726639b1..ea0fdc4d9 100644 --- a/server/models/user/user-video-rate-interface.ts +++ b/server/models/user/user-video-rate-interface.ts @@ -1,10 +1,10 @@ import * as Sequelize from 'sequelize' +import * as Promise from 'bluebird' -import { VideoRateType } from '../../../shared/models/user-video-rate.model' +import { VideoRateType } from '../../../shared/models/videos/video-rate.type' export namespace UserVideoRateMethods { - export type LoadCallback = (err: Error, userVideoRateInstance: UserVideoRateInstance) => void - export type Load = (userId: number, videoId: string, transaction: Sequelize.Transaction, callback: LoadCallback) => void + export type Load = (userId: number, videoId: number, transaction: Sequelize.Transaction) => Promise } export interface UserVideoRateClass { @@ -13,6 +13,8 @@ export interface UserVideoRateClass { export interface UserVideoRateAttributes { type: VideoRateType + userId: number + videoId: number } export interface UserVideoRateInstance extends UserVideoRateClass, UserVideoRateAttributes, Sequelize.Instance {