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 {
|
||||
const headers: any = {};
|
||||
if (this.jwtToken) {
|
||||
headers.Authorization = `Bearer ${this.jwtToken}`;
|
||||
}
|
||||
|
||||
return {
|
||||
baseURL: this.apiUrl,
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.jwtToken}`,
|
||||
},
|
||||
headers: headers,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue