fixed linting

This commit is contained in:
mserranom 2020-03-06 17:03:17 +01:00
parent 6f931ee52b
commit d27275a3ab
3 changed files with 9 additions and 12 deletions

View file

@ -60,7 +60,7 @@ module.exports = MessageFormatter = {
}
}
for (let message of Array.from(messages)) {
for (const message of Array.from(messages)) {
room = rooms_by_id[message.room_id.toString()]
if (room != null) {
thread = getThread(room)
@ -70,7 +70,7 @@ module.exports = MessageFormatter = {
}
}
for (let thread_id in threads) {
for (const thread_id in threads) {
thread = threads[thread_id]
thread.messages.sort((a, b) => a.timestamp - b.timestamp)
}

View file

@ -23,12 +23,10 @@ app.use(metrics.http.monitor(logger))
metrics.injectMetricsRoute(app)
if (app.get('env') === 'development') {
console.log('Development Enviroment')
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))
}
if (app.get('env') === 'production') {
console.log('Production Enviroment')
app.use(express.logger())
app.use(express.errorHandler())
}

View file

@ -1,24 +1,23 @@
module.exports = {
internal: {
chat: {
host: process.env['LISTEN_ADDRESS'] || 'localhost',
host: process.env.LISTEN_ADDRESS || 'localhost',
port: 3010
}
},
apis: {
web: {
url: `http://${process.env['WEB_HOST'] || 'localhost'}:${process.env[
'WEB_PORT'
] || 3000}`,
user: process.env['WEB_API_USER'] || 'sharelatex',
pass: process.env['WEB_API_PASSWORD'] || 'password'
url: `http://${process.env.WEB_HOST || 'localhost'}:${process.env
.WEB_PORT || 3000}`,
user: process.env.WEB_API_USER || 'sharelatex',
pass: process.env.WEB_API_PASSWORD || 'password'
}
},
mongo: {
url:
process.env['MONGO_CONNECTION_STRING'] ||
`mongodb://${process.env['MONGO_HOST'] || 'localhost'}/sharelatex`
process.env.MONGO_CONNECTION_STRING ||
`mongodb://${process.env.MONGO_HOST || 'localhost'}/sharelatex`
}
}