Skip to content

Commit

Permalink
limit model should be .js files
Browse files Browse the repository at this point in the history
  • Loading branch information
a60814billy committed Jun 12, 2021
1 parent 201bd27 commit b83697e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const db: any = {}

fs.readdirSync(__dirname)
.filter(function (file) {
return (file.indexOf('.') !== 0) && (file !== 'index.js')
return (file.indexOf('.') !== 0) && (file !== 'index.js') && file.endsWith('.js')
})
.forEach(function (file) {
const model = sequelize.import(path.join(__dirname, file))
Expand Down

0 comments on commit b83697e

Please sign in to comment.