aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/database.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 17:04:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 17:05:55 +0200
commit075f16caac5236cb04c98ae7b3a989766d764bb3 (patch)
tree9a30024aa771735a28d83d9a166033b82dbcaf60 /server/initializers/database.ts
parent4e979c3e1b81f4762025d9db3052b1f70774b3bb (diff)
downloadPeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.gz
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.zst
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.zip
Remove "function" in favor of () => {}
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r--server/initializers/database.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index 6e3a8d009..9e691bf1d 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -60,7 +60,7 @@ const sequelize = new Sequelize(dbname, username, password, {
60 port: CONFIG.DATABASE.PORT, 60 port: CONFIG.DATABASE.PORT,
61 benchmark: isTestInstance(), 61 benchmark: isTestInstance(),
62 62
63 logging: function (message: string, benchmark: number) { 63 logging: (message: string, benchmark: number) => {
64 let newMessage = message 64 let newMessage = message
65 if (benchmark !== undefined) { 65 if (benchmark !== undefined) {
66 newMessage += ' | ' + benchmark + 'ms' 66 newMessage += ' | ' + benchmark + 'ms'
@@ -72,7 +72,7 @@ const sequelize = new Sequelize(dbname, username, password, {
72 72
73database.sequelize = sequelize 73database.sequelize = sequelize
74 74
75database.init = function (silent: boolean) { 75database.init = (silent: boolean) => {
76 const modelDirectory = join(__dirname, '..', 'models') 76 const modelDirectory = join(__dirname, '..', 'models')
77 77
78 return getModelFiles(modelDirectory).then(filePaths => { 78 return getModelFiles(modelDirectory).then(filePaths => {
@@ -105,7 +105,7 @@ export {
105function getModelFiles (modelDirectory: string) { 105function getModelFiles (modelDirectory: string) {
106 return readdirPromise(modelDirectory) 106 return readdirPromise(modelDirectory)
107 .then(files => { 107 .then(files => {
108 const directories: string[] = files.filter(function (directory) { 108 const directories: string[] = files.filter(directory => {
109 // Find directories 109 // Find directories
110 if ( 110 if (
111 directory.endsWith('.js.map') || 111 directory.endsWith('.js.map') ||