Revert "Merge branch 'features/null_bearer2' into 'develop'"

This reverts commit c14fc2fa9d, reversing
changes made to 22c3fa995d.
This commit is contained in:
Fosco Marotto 2021-02-09 23:58:00 -05:00
parent ad35c7fa72
commit a1a97bb483
1 changed files with 5 additions and 6 deletions

View File

@ -40,13 +40,12 @@ const notify = options =>
const fetchFromApi = (path, method, accessToken) => {
const url = (new URL(path, self.location)).href;
let headers = {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
}
if (!accessToken) { delete headers['Authorization'] }
return fetch(url, {
headers: headers,
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
method: method,
credentials: 'include',
}).then(res => {