From 6fcd19ba737f1f5614a56c6925adb882dea43b8d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Jul 2017 13:26:25 +0200 Subject: Move to promises Closes https://github.com/Chocobozzz/PeerTube/issues/74 --- server/models/user/user-video-rate.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/models/user/user-video-rate.ts') diff --git a/server/models/user/user-video-rate.ts b/server/models/user/user-video-rate.ts index 4bdd35bc9..37d0222cf 100644 --- a/server/models/user/user-video-rate.ts +++ b/server/models/user/user-video-rate.ts @@ -8,7 +8,6 @@ import { VIDEO_RATE_TYPES } from '../../initializers' import { addMethodsToModel } from '../utils' import { - UserVideoRateClass, UserVideoRateInstance, UserVideoRateAttributes, @@ -66,7 +65,7 @@ function associate (models) { }) } -load = function (userId: number, videoId: string, transaction: Sequelize.Transaction, callback: UserVideoRateMethods.LoadCallback) { +load = function (userId: number, videoId: string, transaction: Sequelize.Transaction) { const options: Sequelize.FindOptions = { where: { userId, @@ -75,5 +74,5 @@ load = function (userId: number, videoId: string, transaction: Sequelize.Transac } if (transaction) options.transaction = transaction - return UserVideoRate.findOne(options).asCallback(callback) + return UserVideoRate.findOne(options) } -- cgit v1.2.3