]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/oauth/oauth-client.ts
Move to promises
[github/Chocobozzz/PeerTube.git] / server / models / oauth / oauth-client.ts
index fbc2a339317de610d1f666dee950d3d34b204104..9cc68771dad5983d959f93ea6de09094574676a5 100644 (file)
@@ -2,7 +2,6 @@ import * as Sequelize from 'sequelize'
 
 import { addMethodsToModel } from '../utils'
 import {
-  OAuthClientClass,
   OAuthClientInstance,
   OAuthClientAttributes,
 
@@ -67,12 +66,12 @@ function associate (models) {
   })
 }
 
-countTotal = function (callback: OAuthClientMethods.CountTotalCallback) {
-  return OAuthClient.count().asCallback(callback)
+countTotal = function () {
+  return OAuthClient.count()
 }
 
-loadFirstClient = function (callback: OAuthClientMethods.LoadFirstClientCallback) {
-  return OAuthClient.findOne().asCallback(callback)
+loadFirstClient = function () {
+  return OAuthClient.findOne()
 }
 
 getByIdAndSecret = function (clientId: string, clientSecret: string) {