diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/initializers/checker.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip |
Move models to typescript-sequelize
Diffstat (limited to 'server/initializers/checker.ts')
-rw-r--r-- | server/initializers/checker.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 317d59423..7e76990b5 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import * as config from 'config' | 1 | import * as config from 'config' |
2 | import { promisify0 } from '../helpers/core-utils' | 2 | import { promisify0 } from '../helpers' |
3 | import { UserModel } from '../models/account/user-interface' | 3 | import { UserModel } from '../models/account/user' |
4 | import { ApplicationModel } from '../models/application/application-interface' | 4 | import { ApplicationModel } from '../models/application/application' |
5 | import { OAuthClientModel } from '../models/oauth/oauth-client-interface' | 5 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
6 | 6 | ||
7 | // Some checks on configuration files | 7 | // Some checks on configuration files |
8 | function checkConfig () { | 8 | function checkConfig () { |
@@ -57,22 +57,22 @@ async function checkFFmpeg (CONFIG: { TRANSCODING: { ENABLED: boolean } }) { | |||
57 | } | 57 | } |
58 | 58 | ||
59 | // We get db by param to not import it in this file (import orders) | 59 | // We get db by param to not import it in this file (import orders) |
60 | async function clientsExist (OAuthClient: OAuthClientModel) { | 60 | async function clientsExist () { |
61 | const totalClients = await OAuthClient.countTotal() | 61 | const totalClients = await OAuthClientModel.countTotal() |
62 | 62 | ||
63 | return totalClients !== 0 | 63 | return totalClients !== 0 |
64 | } | 64 | } |
65 | 65 | ||
66 | // We get db by param to not import it in this file (import orders) | 66 | // We get db by param to not import it in this file (import orders) |
67 | async function usersExist (User: UserModel) { | 67 | async function usersExist () { |
68 | const totalUsers = await User.countTotal() | 68 | const totalUsers = await UserModel.countTotal() |
69 | 69 | ||
70 | return totalUsers !== 0 | 70 | return totalUsers !== 0 |
71 | } | 71 | } |
72 | 72 | ||
73 | // We get db by param to not import it in this file (import orders) | 73 | // We get db by param to not import it in this file (import orders) |
74 | async function applicationExist (Application: ApplicationModel) { | 74 | async function applicationExist () { |
75 | const totalApplication = await Application.countTotal() | 75 | const totalApplication = await ApplicationModel.countTotal() |
76 | 76 | ||
77 | return totalApplication !== 0 | 77 | return totalApplication !== 0 |
78 | } | 78 | } |