]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/checker.js
Server: always check commit result
[github/Chocobozzz/PeerTube.git] / server / initializers / checker.js
index 7b402de8201fb1e6c34323099193de1ce54a242f..6471bb4f11fcb940d3833d61743951d777b014bd 100644 (file)
@@ -27,7 +27,7 @@ function checkConfig () {
 function checkMissedConfig () {
   const required = [ 'listen.port',
     'webserver.https', 'webserver.hostname', 'webserver.port',
-    'database.hostname', 'database.port', 'database.suffix',
+    'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
     'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews'
   ]
   const miss = []
@@ -42,10 +42,10 @@ function checkMissedConfig () {
 }
 
 function clientsExist (callback) {
-  db.OAuthClient.list(function (err, clients) {
+  db.OAuthClient.countTotal(function (err, totalClients) {
     if (err) return callback(err)
 
-    return callback(null, clients.length !== 0)
+    return callback(null, totalClients !== 0)
   })
 }