aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 17:53:50 +0100
committerChocobozzz <me@florianbigard.com>2017-12-13 16:50:33 +0100
commit3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch)
treee5ca358287fca6ecacce83defcf23af1e8e9f419 /server/initializers/checker.ts
parentc893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff)
downloadPeerTube-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.ts20
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 @@
1import * as config from 'config' 1import * as config from 'config'
2import { promisify0 } from '../helpers/core-utils' 2import { promisify0 } from '../helpers'
3import { UserModel } from '../models/account/user-interface' 3import { UserModel } from '../models/account/user'
4import { ApplicationModel } from '../models/application/application-interface' 4import { ApplicationModel } from '../models/application/application'
5import { OAuthClientModel } from '../models/oauth/oauth-client-interface' 5import { OAuthClientModel } from '../models/oauth/oauth-client'
6 6
7// Some checks on configuration files 7// Some checks on configuration files
8function checkConfig () { 8function 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)
60async function clientsExist (OAuthClient: OAuthClientModel) { 60async 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)
67async function usersExist (User: UserModel) { 67async 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)
74async function applicationExist (Application: ApplicationModel) { 74async 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}