Skip to content

Commit

Permalink
fix(model): now replacing sample name properly. Nits too
Browse files Browse the repository at this point in the history
  • Loading branch information
robophil committed Oct 13, 2017
1 parent d66626a commit aaa201f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cmd/types/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const copy = require('../../../helper/copy')

module.exports = (names, options) => {
const type = 'model'
const regex = /serviceName/g
const regex = /model_name/g
copy(names, type, regex).then(() => {
console.log('\n')
names.forEach(name => {
Expand Down
1 change: 1 addition & 0 deletions files/action/db.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ orm.initialize({adapters, connections}, (err, ormObject) => {
if (err) throw new Error(err)
const models = Object.keys(ormObject.collections)
models.forEach(model => {
model = model.charAt(0).toUpperCase() + model.slice(1)
global[model] = orm.collections[model]
})
console.log(`Models loaded successfully !!`)
Expand Down

0 comments on commit aaa201f

Please sign in to comment.