aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/oauth/oauth-client.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-05 13:26:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-05 14:14:16 +0200
commit6fcd19ba737f1f5614a56c6925adb882dea43b8d (patch)
tree3365a96d82bc7f00ae504a568725c8e914150cf8 /server/models/oauth/oauth-client.ts
parent5fe7e898316e18369c3e1aba307b55077adc7bfb (diff)
downloadPeerTube-6fcd19ba737f1f5614a56c6925adb882dea43b8d.tar.gz
PeerTube-6fcd19ba737f1f5614a56c6925adb882dea43b8d.tar.zst
PeerTube-6fcd19ba737f1f5614a56c6925adb882dea43b8d.zip
Move to promises
Closes https://github.com/Chocobozzz/PeerTube/issues/74
Diffstat (limited to 'server/models/oauth/oauth-client.ts')
-rw-r--r--server/models/oauth/oauth-client.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/models/oauth/oauth-client.ts b/server/models/oauth/oauth-client.ts
index fbc2a3393..9cc68771d 100644
--- a/server/models/oauth/oauth-client.ts
+++ b/server/models/oauth/oauth-client.ts
@@ -2,7 +2,6 @@ import * as Sequelize from 'sequelize'
2 2
3import { addMethodsToModel } from '../utils' 3import { addMethodsToModel } from '../utils'
4import { 4import {
5 OAuthClientClass,
6 OAuthClientInstance, 5 OAuthClientInstance,
7 OAuthClientAttributes, 6 OAuthClientAttributes,
8 7
@@ -67,12 +66,12 @@ function associate (models) {
67 }) 66 })
68} 67}
69 68
70countTotal = function (callback: OAuthClientMethods.CountTotalCallback) { 69countTotal = function () {
71 return OAuthClient.count().asCallback(callback) 70 return OAuthClient.count()
72} 71}
73 72
74loadFirstClient = function (callback: OAuthClientMethods.LoadFirstClientCallback) { 73loadFirstClient = function () {
75 return OAuthClient.findOne().asCallback(callback) 74 return OAuthClient.findOne()
76} 75}
77 76
78getByIdAndSecret = function (clientId: string, clientSecret: string) { 77getByIdAndSecret = function (clientId: string, clientSecret: string) {