mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +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
|
@ -1,5 +1,5 @@
|
|||
import * as Sequelize from 'sequelize'
|
||||
import * as Bluebird from 'bluebird'
|
||||
import * as Promise from 'bluebird'
|
||||
|
||||
import { UserModel } from '../user'
|
||||
|
||||
|
@ -15,12 +15,11 @@ export type OAuthTokenInfo = {
|
|||
}
|
||||
|
||||
export namespace OAuthTokenMethods {
|
||||
export type GetByRefreshTokenAndPopulateClient = (refreshToken: string) => Bluebird<OAuthTokenInfo>
|
||||
export type GetByTokenAndPopulateUser = (bearerToken: string) => Bluebird<OAuthTokenInstance>
|
||||
export type GetByRefreshTokenAndPopulateUser = (refreshToken: string) => Bluebird<OAuthTokenInstance>
|
||||
export type GetByRefreshTokenAndPopulateClient = (refreshToken: string) => Promise<OAuthTokenInfo>
|
||||
export type GetByTokenAndPopulateUser = (bearerToken: string) => Promise<OAuthTokenInstance>
|
||||
export type GetByRefreshTokenAndPopulateUser = (refreshToken: string) => Promise<OAuthTokenInstance>
|
||||
|
||||
export type RemoveByUserIdCallback = (err: Error) => void
|
||||
export type RemoveByUserId = (userId, callback) => void
|
||||
export type RemoveByUserId = (userId) => Promise<number>
|
||||
}
|
||||
|
||||
export interface OAuthTokenClass {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue