Skip to content

Commit

Permalink
fix: set baseURL when using custom httpClient
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Jan 24, 2024
1 parent e0c2a87 commit 870ac23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SkolengoUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class SkolengoUser extends Skolengo {
public static async getSkolengoUser (credentials: AuthConfig): Promise<SkolengoUser> {
const Logger = logger()

const httpClient = axios.create()
const httpClient = axios.create({ baseURL: 'https://api.skolengo.com/api/v1/bff-sko-app' })
httpClient.interceptors.response.use(res => {
const { host, path, method } = res.request as ClientRequest
Logger.log({ level: 'verbose', message: `${method} ${res.status}:${res.statusText} https://${(host ?? '') + (path ?? '')}` })
Expand Down

0 comments on commit 870ac23

Please sign in to comment.