Updated the RequestUtil.js

This commit is contained in:
Mathias Wagner 2023-11-13 13:09:33 +01:00
parent d46fecedbb
commit 50fc6bd379
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -1,6 +1,6 @@
// Get the default headers of the request
const getHeaders = () => {
return localStorage.getItem("token") === undefined ? {Authorization: "Basic " + localStorage.getItem("token")} : {};
return localStorage.getItem("token") ? {Authorization: "Basic " + localStorage.getItem("token")} : {};
}
// Run a plain request with all default values