diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-10 22:15:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-10 22:15:25 +0200 |
commit | 69818c9394366b954b6ba3bd697bd9d2b09f2a16 (patch) | |
tree | ad199a18ec3c322460d6f9523fc383ee562554e0 /server/initializers/database.ts | |
parent | 4d4e5cd4dca78480ec7f40e747f424cd107376a4 (diff) | |
download | PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.gz PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.zst PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.zip |
Type functions
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r-- | server/initializers/database.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index b0f47876e..78ca5ab84 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -59,7 +59,7 @@ const sequelize = new Sequelize(dbname, username, password, { | |||
59 | port: CONFIG.DATABASE.PORT, | 59 | port: CONFIG.DATABASE.PORT, |
60 | benchmark: isTestInstance(), | 60 | benchmark: isTestInstance(), |
61 | 61 | ||
62 | logging: function (message, benchmark) { | 62 | logging: function (message: string, benchmark: number) { |
63 | let newMessage = message | 63 | let newMessage = message |
64 | if (benchmark !== undefined) { | 64 | if (benchmark !== undefined) { |
65 | newMessage += ' | ' + benchmark + 'ms' | 65 | newMessage += ' | ' + benchmark + 'ms' |
@@ -71,7 +71,7 @@ const sequelize = new Sequelize(dbname, username, password, { | |||
71 | 71 | ||
72 | database.sequelize = sequelize | 72 | database.sequelize = sequelize |
73 | 73 | ||
74 | database.init = function (silent, callback) { | 74 | database.init = function (silent: boolean, callback: (err: Error) => void) { |
75 | 75 | ||
76 | const modelDirectory = join(__dirname, '..', 'models') | 76 | const modelDirectory = join(__dirname, '..', 'models') |
77 | fs.readdir(modelDirectory, function (err, files) { | 77 | fs.readdir(modelDirectory, function (err, files) { |