Skip to content

Commit cbe94a5

Browse files
massimo-uatalyssonoc
authored andcommitted
Update index.js (#36)
Fixed error message typo Db config import was made more ES6 friendly
1 parent adce807 commit cbe94a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/infra/database/models/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { ModelsLoader } = require('src/infra/sequelize');
22
const Sequelize = require('sequelize');
3-
const config = require('config').db;
3+
const { db: config } = require('config');
44

55
if(config) {
66
const sequelize = new Sequelize(config);
@@ -11,7 +11,7 @@ if(config) {
1111
});
1212
} else {
1313
/* eslint-disable no-console */
14-
console.error('Database config file log found, disabling database.');
14+
console.error('Database configuration not found, disabling database.');
1515
/* eslint-enable no-console */
1616
}
1717

0 commit comments

Comments
 (0)