Fixed linter errors
This commit is contained in:
parent
a297829ffc
commit
4a43aaabb6
@ -12,6 +12,11 @@ db.items = require('./item.js')(sequelize, Sequelize);
|
|||||||
|
|
||||||
module.exports = db;
|
module.exports = db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a sequelize database connection.
|
||||||
|
*
|
||||||
|
* @return {object} - sequelize connection
|
||||||
|
*/
|
||||||
function initDatabase() {
|
function initDatabase() {
|
||||||
let sequelize = null;
|
let sequelize = null;
|
||||||
|
|
||||||
@ -21,7 +26,10 @@ function initDatabase() {
|
|||||||
storage: dbConfig.get('connection_string'),
|
storage: dbConfig.get('connection_string'),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
sequelize = new Sequelize(dbConfig.get('name'), dbConfig.get('username'), dbConfig.get('password'), {
|
const dbName = dbConfig.get('name');
|
||||||
|
const dbUsername = dbConfig.get('username');
|
||||||
|
const dbPassword = dbConfig.get('password');
|
||||||
|
sequelize = new Sequelize(dbName, dbUsername, dbPassword, {
|
||||||
dialect: dbConfig.get('driver'),
|
dialect: dbConfig.get('driver'),
|
||||||
host: dbConfig.get('address'),
|
host: dbConfig.get('address'),
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user