Skip to content

Commit

Permalink
Add service method in Service class, fix #358
Browse files Browse the repository at this point in the history
  • Loading branch information
welefen committed Aug 4, 2016
1 parent 4da64ac commit a5e676e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/service/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ export default class extends think.base {
options = think.extend({}, think.config('db', undefined, module), options);
return think.model(name, options, module);
}
/**
* get service
* @return {} []
*/
service(name, module){
module = module || this.parseModuleFromPath();
return think.service(name, module);
}
}

0 comments on commit a5e676e

Please sign in to comment.