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

Commit

Permalink
Inject the service manager as dependency. (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrik committed Jan 2, 2018
1 parent 0f6c949 commit eff1501
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/ApiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class ApiService extends Service {

bind(expressApp) {
const version = this.serviceConfig.get('version');
const authTokenRepository = this.serviceManager.get('authTokenRepository');
const serviceManager = this.serviceManager;
const authTokenRepository = serviceManager.get('authTokenRepository');

expressOpenapi.initialize({
app: expressApp,
Expand All @@ -24,6 +25,7 @@ class ApiService extends Service {
validateApiDoc: true,
dependencies: {
version,
serviceManager,
},
consumesMiddleware: {
'application/json': bodyParser.json(),
Expand Down

0 comments on commit eff1501

Please sign in to comment.