diff options
Diffstat (limited to 'server/initializers/checker.js')
-rw-r--r-- | server/initializers/checker.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/initializers/checker.js b/server/initializers/checker.js index 3831efb8d..91fbcfaf9 100644 --- a/server/initializers/checker.js +++ b/server/initializers/checker.js | |||
@@ -7,9 +7,9 @@ const Client = mongoose.model('OAuthClient') | |||
7 | const User = mongoose.model('User') | 7 | const User = mongoose.model('User') |
8 | 8 | ||
9 | const checker = { | 9 | const checker = { |
10 | checkConfig: checkConfig, | 10 | checkConfig, |
11 | clientsExist: clientsExist, | 11 | clientsExist, |
12 | usersExist: usersExist | 12 | usersExist |
13 | } | 13 | } |
14 | 14 | ||
15 | // Check the config files | 15 | // Check the config files |
@@ -17,8 +17,8 @@ function checkConfig () { | |||
17 | const required = [ 'listen.port', | 17 | const required = [ 'listen.port', |
18 | 'webserver.https', 'webserver.host', 'webserver.port', | 18 | 'webserver.https', 'webserver.host', 'webserver.port', |
19 | 'database.host', 'database.port', 'database.suffix', | 19 | 'database.host', 'database.port', 'database.suffix', |
20 | 'storage.certs', 'storage.uploads', 'storage.logs', | 20 | 'storage.certs', 'storage.uploads', 'storage.logs', 'storage.thumbnails', |
21 | 'network.friends', 'electron.debug' ] | 21 | 'electron.debug' ] |
22 | const miss = [] | 22 | const miss = [] |
23 | 23 | ||
24 | for (const key of required) { | 24 | for (const key of required) { |
@@ -39,10 +39,10 @@ function clientsExist (callback) { | |||
39 | } | 39 | } |
40 | 40 | ||
41 | function usersExist (callback) { | 41 | function usersExist (callback) { |
42 | User.list(function (err, users) { | 42 | User.countTotal(function (err, totalUsers) { |
43 | if (err) return callback(err) | 43 | if (err) return callback(err) |
44 | 44 | ||
45 | return callback(null, users.length !== 0) | 45 | return callback(null, totalUsers !== 0) |
46 | }) | 46 | }) |
47 | } | 47 | } |
48 | 48 | ||