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

Commit

Permalink
Make url simple
Browse files Browse the repository at this point in the history
  • Loading branch information
rogaldh committed Jan 16, 2020
1 parent 08e36f8 commit a9c6839
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ export class HttpEventsResource {
httpClient,
tokenProvider
) {
this.baseUrl = `${host}/${endpoint}`
this.httpClient = httpClient
this.tokenProvider = tokenProvider
if (typeof endpoint === 'string') {
// TODO: deprecate complex url later
this.baseUrl = `${host}/${endpoint}`
this.httpClient = httpClient
this.tokenProvider = tokenProvider
} else {
// bypass solid url on instantiation
this.baseUrl = `${host}`
this.httpClient = endpoint
this.tokenProvider = httpClient
}
}
static _headers (token, params = {}) {
const { randomId } = params
Expand Down

0 comments on commit a9c6839

Please sign in to comment.