Skip to content

Commit

Permalink
refactor(constructor): receive data as an object
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianfranco97 committed Jan 17, 2018
1 parent 8262338 commit 05c6a88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
url: '',
appToken: '',
sessionToken: ''
url: undefined,
appToken: undefined,
sessionToken: undefined
}
2 changes: 1 addition & 1 deletion src/restclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import config from './config'
import ITEMTYPE from './itemtype.json'

class GlpiRestClient {
constructor (url, appToken = '') {
constructor ({url, appToken}) {
config.url = url
config.appToken = appToken
config.sessionToken = ''
Expand Down

0 comments on commit 05c6a88

Please sign in to comment.