mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Move to promises
Closes https://github.com/Chocobozzz/PeerTube/issues/74
This commit is contained in:
parent
5fe7e89831
commit
6fcd19ba73
88 changed files with 1980 additions and 2505 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue