fix(ui): assist cred call with header
This commit is contained in:
parent
baebdcd8d2
commit
b83d8db2a9
2 changed files with 6 additions and 2 deletions
|
|
@ -58,13 +58,17 @@ export default class APIClient {
|
|||
private onUpdateJwt: (data: { jwt?: string, spotJwt?: string }) => void;
|
||||
private refreshingTokenPromise: Promise<string> | null = null;
|
||||
|
||||
constructor() {
|
||||
constructor(jwt?: string | null) {
|
||||
this.init = {
|
||||
headers: new Headers({
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
})
|
||||
};
|
||||
|
||||
if (jwt) {
|
||||
this.setJwt(jwt);
|
||||
}
|
||||
}
|
||||
|
||||
setJwt(jwt: string | null): void {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function LivePlayer({
|
|||
},
|
||||
};
|
||||
if (isEnterprise) {
|
||||
new APIClient()
|
||||
new APIClient(userStore.jwt)
|
||||
.get('/config/assist/credentials')
|
||||
.then((r) => r.json())
|
||||
.then(({ data }) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue