aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-10 22:15:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-10 22:15:25 +0200
commit69818c9394366b954b6ba3bd697bd9d2b09f2a16 (patch)
treead199a18ec3c322460d6f9523fc383ee562554e0 /server/initializers/checker.ts
parent4d4e5cd4dca78480ec7f40e747f424cd107376a4 (diff)
downloadPeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.gz
PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.zst
PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.zip
Type functions
Diffstat (limited to 'server/initializers/checker.ts')
-rw-r--r--server/initializers/checker.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts
index 8c3d64b60..7007f2c0b 100644
--- a/server/initializers/checker.ts
+++ b/server/initializers/checker.ts
@@ -23,7 +23,7 @@ function checkMissedConfig () {
23 'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews', 23 'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews',
24 'admin.email', 'signup.enabled', 'transcoding.enabled', 'transcoding.threads' 24 'admin.email', 'signup.enabled', 'transcoding.enabled', 'transcoding.threads'
25 ] 25 ]
26 const miss = [] 26 const miss: string[] = []
27 27
28 for (const key of required) { 28 for (const key of required) {
29 if (!config.has(key)) { 29 if (!config.has(key)) {
@@ -35,7 +35,7 @@ function checkMissedConfig () {
35} 35}
36 36
37// Check the available codecs 37// Check the available codecs
38function checkFFmpeg (callback) { 38function checkFFmpeg (callback: (err: Error) => void) {
39 const Ffmpeg = require('fluent-ffmpeg') 39 const Ffmpeg = require('fluent-ffmpeg')
40 40
41 Ffmpeg.getAvailableCodecs(function (err, codecs) { 41 Ffmpeg.getAvailableCodecs(function (err, codecs) {
@@ -57,7 +57,7 @@ function checkFFmpeg (callback) {
57 }) 57 })
58} 58}
59 59
60function clientsExist (callback) { 60function clientsExist (callback: (err: Error, clientsExist?: boolean) => void) {
61 db.OAuthClient.countTotal(function (err, totalClients) { 61 db.OAuthClient.countTotal(function (err, totalClients) {
62 if (err) return callback(err) 62 if (err) return callback(err)
63 63
@@ -65,7 +65,7 @@ function clientsExist (callback) {
65 }) 65 })
66} 66}
67 67
68function usersExist (callback) { 68function usersExist (callback: (err: Error, usersExist?: boolean) => void) {
69 db.User.countTotal(function (err, totalUsers) { 69 db.User.countTotal(function (err, totalUsers) {
70 if (err) return callback(err) 70 if (err) return callback(err)
71 71