X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Foauth%2Foauth-client-interface.ts;h=3526e41595932d21a02a708d9f6bca666474e03a;hb=6fcd19ba737f1f5614a56c6925adb882dea43b8d;hp=3b4325740bca26675dd8d3b478dd9e35770fc866;hpb=74889a71fe687dda74f2a687653122327807af36;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/oauth/oauth-client-interface.ts b/server/models/oauth/oauth-client-interface.ts index 3b4325740..3526e4159 100644 --- a/server/models/oauth/oauth-client-interface.ts +++ b/server/models/oauth/oauth-client-interface.ts @@ -1,13 +1,12 @@ import * as Sequelize from 'sequelize' +import * as Promise from 'bluebird' export namespace OAuthClientMethods { - export type CountTotalCallback = (err: Error, total: number) => void - export type CountTotal = (callback: CountTotalCallback) => void + export type CountTotal = () => Promise - export type LoadFirstClientCallback = (err: Error, client: OAuthClientInstance) => void - export type LoadFirstClient = (callback: LoadFirstClientCallback) => void + export type LoadFirstClient = () => Promise - export type GetByIdAndSecret = (clientId, clientSecret) => void + export type GetByIdAndSecret = (clientId: string, clientSecret: string) => Promise } export interface OAuthClientClass {