diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-07-05 13:26:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-07-05 14:14:16 +0200 |
commit | 6fcd19ba737f1f5614a56c6925adb882dea43b8d (patch) | |
tree | 3365a96d82bc7f00ae504a568725c8e914150cf8 /server/models/oauth/oauth-client.ts | |
parent | 5fe7e898316e18369c3e1aba307b55077adc7bfb (diff) | |
download | PeerTube-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.ts | 9 |
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 | ||
3 | import { addMethodsToModel } from '../utils' | 3 | import { addMethodsToModel } from '../utils' |
4 | import { | 4 | import { |
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 | ||
70 | countTotal = function (callback: OAuthClientMethods.CountTotalCallback) { | 69 | countTotal = function () { |
71 | return OAuthClient.count().asCallback(callback) | 70 | return OAuthClient.count() |
72 | } | 71 | } |
73 | 72 | ||
74 | loadFirstClient = function (callback: OAuthClientMethods.LoadFirstClientCallback) { | 73 | loadFirstClient = function () { |
75 | return OAuthClient.findOne().asCallback(callback) | 74 | return OAuthClient.findOne() |
76 | } | 75 | } |
77 | 76 | ||
78 | getByIdAndSecret = function (clientId: string, clientSecret: string) { | 77 | getByIdAndSecret = function (clientId: string, clientSecret: string) { |