]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/user/user-video-rate-interface.ts
Upgrade common server dependencies
[github/Chocobozzz/PeerTube.git] / server / models / user / user-video-rate-interface.ts
index a726639b1e7578b347cb13c68bcd2db6cc1f4d90..ea0fdc4d91e28144590e23ff2826d5cc60601b9e 100644 (file)
@@ -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<UserVideoRateInstance>
 }
 
 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<UserVideoRateAttributes> {