aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/checker.ts')
-rw-r--r--server/initializers/checker.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts
index b69188f7e..317d59423 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'
2
3import { promisify0 } from '../helpers/core-utils' 2import { promisify0 } from '../helpers/core-utils'
4import { OAuthClientModel } from '../models/oauth/oauth-client-interface'
5import { UserModel } from '../models/account/user-interface' 3import { UserModel } from '../models/account/user-interface'
4import { ApplicationModel } from '../models/application/application-interface'
5import { OAuthClientModel } from '../models/oauth/oauth-client-interface'
6 6
7// Some checks on configuration files 7// Some checks on configuration files
8function checkConfig () { 8function checkConfig () {
@@ -70,6 +70,13 @@ async function usersExist (User: UserModel) {
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)
74async function applicationExist (Application: ApplicationModel) {
75 const totalApplication = await Application.countTotal()
76
77 return totalApplication !== 0
78}
79
73// --------------------------------------------------------------------------- 80// ---------------------------------------------------------------------------
74 81
75export { 82export {
@@ -77,5 +84,6 @@ export {
77 checkFFmpeg, 84 checkFFmpeg,
78 checkMissedConfig, 85 checkMissedConfig,
79 clientsExist, 86 clientsExist,
80 usersExist 87 usersExist,
88 applicationExist
81} 89}