Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
feat(api-client): implement api-client
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 29, 2017
1 parent 2659ee6 commit 1e5edd1
Show file tree
Hide file tree
Showing 14 changed files with 684 additions and 108 deletions.
105 changes: 82 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"lodash": "^4.17.4",
"macroable": "^1.0.0",
"node-cookie": "^2.0.2",
"p-series": "^1.0.0"
"p-series": "^1.0.0",
"superagent": "^3.6.0"
},
"config": {
"commitizen": {
Expand All @@ -51,7 +52,8 @@
"exclude": [
"providers",
"bin",
"test"
"test",
"commands"
]
}
}
6 changes: 3 additions & 3 deletions providers/VowProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ class VowProvider extends ServiceProvider {
*/
_registerApiClient () {
this.app.bind('Test/ApiClient', (app) => {
const Env = app.use('Adonis/Src/Env')
const Config = app.use('Adonis/Src/Config')
const ApiClient = require('../src/ApiClient')
return function ({ Context }) {
return function ({ Context, Request }) {
Context.getter('client', function () {
return new ApiClient(Env, this.assert)
return new ApiClient(Config, Request, this.assert)
}, true)
}
})
Expand Down
Loading

0 comments on commit 1e5edd1

Please sign in to comment.