fix: if jwt is not set, don't send it
This commit is contained in:
parent
d490ac55ce
commit
daf38957a4
|
@ -129,11 +129,14 @@ export default class AccountApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildOptions(): any {
|
private buildOptions(): any {
|
||||||
|
const headers: any = {};
|
||||||
|
if (this.jwtToken) {
|
||||||
|
headers.Authorization = `Bearer ${this.jwtToken}`;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
baseURL: this.apiUrl,
|
baseURL: this.apiUrl,
|
||||||
headers: {
|
headers: headers,
|
||||||
Authorization: `Bearer ${this.jwtToken}`,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue