fix: if jwt is not set, don't send it

This commit is contained in:
Derrick Hammer 2024-03-13 12:56:01 -04:00
parent d490ac55ce
commit daf38957a4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 3 deletions

View File

@ -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,
};
}
}