Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
fix(core): loading both js and ts models
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed May 12, 2020
1 parent ae1d05d commit d737f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sequelize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const logger = loggingFactory('db')

export function sequelizeFactory (): Sequelize {
const dbSettings: SequelizeOptions = {
models: [path.join(__dirname, '/**/*.model.ts')],
models: [path.join(__dirname, '/**/*.model.+(ts|js)')],
modelMatch: (filename: string, member: string): boolean => {
return filename.substring(0, filename.indexOf('.model')) === member.toLowerCase()
},
Expand Down

0 comments on commit d737f4f

Please sign in to comment.