fix: invalid token are sent
This commit is contained in:
parent
c5e8081c31
commit
82b1b97cc6
|
|
@ -112,7 +112,7 @@ export default class FetchRequest {
|
|||
|
||||
public setAuthorizationHeader (token: string): void {
|
||||
if (!this.options.headers) this.options.headers = {}
|
||||
this.options.headers.Authorization = `Token ${token}`
|
||||
if (token) this.options.headers.Authorization = `Token ${token}`
|
||||
}
|
||||
|
||||
public deleteAuthorizationHeader (): void {
|
||||
|
|
|
|||
Loading…
Reference in New Issue