Skip to content

Commit

Permalink
L3-43: a little nicer way to initiate database.
Browse files Browse the repository at this point in the history
  • Loading branch information
n3op2 committed Mar 13, 2023
1 parent 4cb221f commit 0363d94
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/no-explicit-any": "off",
"no-console": 2
},
"overrides": [
Expand Down
3 changes: 1 addition & 2 deletions src/lib/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export default class Database {
constructor() {
this.log = logger
this.client = knex(pgConfig)
this.db = () => {
const models: any = {}
this.db = (models: any = {}) => {
fs.readdirSync(MODELS_DIRECTORY).forEach((file: string): any => {
this.log.debug('initializing db models')
const { name } = path.parse(file)
Expand Down

0 comments on commit 0363d94

Please sign in to comment.