aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-14 17:31:26 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commit350e31d6b64e4973dfa5e9f7b46841cb09aeb1ad (patch)
treef4191f3c04a5230fcf8ca3d6ca3248643fc4151d /server/initializers/checker.ts
parente34c85e527100c0b5c44567bd951e95be41b8d7e (diff)
downloadPeerTube-350e31d6b64e4973dfa5e9f7b46841cb09aeb1ad.tar.gz
PeerTube-350e31d6b64e4973dfa5e9f7b46841cb09aeb1ad.tar.zst
PeerTube-350e31d6b64e4973dfa5e9f7b46841cb09aeb1ad.zip
Follow works
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}