use token instead of idToken

This commit is contained in:
Erik Larsson
2021-02-18 04:05:50 +01:00
parent 8d6e2fd36b
commit afebbadd34
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -49,12 +49,12 @@ export class TechDocsDevStorageApi implements TechDocsStorage {
const apiOrigin = await this.getApiOrigin();
const url = `${apiOrigin}/${name}/${path}`;
const idToken = await this.identityApi.getIdToken();
const token = await this.identityApi.getIdToken();
const request = await fetch(
`${url.endsWith('/') ? url : `${url}/`}index.html`,
{
headers: idToken ? { Authorization: `Bearer ${idToken}` } : {},
headers: token ? { Authorization: `Bearer ${token}` } : {},
},
);