mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
Update sequelize init condition
This commit is contained in:
parent
74c1da4536
commit
5282bf491e
1 changed files with 4 additions and 5 deletions
|
@ -12,12 +12,11 @@ var logger = require("../logger.js");
|
|||
var dbconfig = config.db;
|
||||
dbconfig.logging = config.debug ? logger.info : false;
|
||||
|
||||
var sequelize;
|
||||
if (typeof dbconfig.username === 'undefined' && typeof dbconfig.password === 'undefined') {
|
||||
sequelize = new Sequelize(dbconfig.database, dbconfig);
|
||||
} else {
|
||||
var sequelize = null;
|
||||
if (dbconfig.hasOwnProperty('username') || dbconfig.hasOwnProperty('password'))
|
||||
sequelize = new Sequelize(dbconfig.database, dbconfig.username, dbconfig.password, dbconfig);
|
||||
}
|
||||
else
|
||||
sequelize = new Sequelize(dbconfig.database, dbconfig);
|
||||
|
||||
var db = {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue