This commit is contained in:
Claude Brisson
2024-02-29 23:11:01 +01:00
parent 2a9031193b
commit 437ab91650

View File

@@ -19,7 +19,7 @@ let headers = function(withJson) {
if (withJson) { if (withJson) {
ret['Content-Type'] = 'application/json'; ret['Content-Type'] = 'application/json';
} }
if (apiToken) { if (typeof(apiToken) !== 'undefined') {
ret['Authorization'] = `Bearer ${apiToken}`; ret['Authorization'] = `Bearer ${apiToken}`;
} }
return ret; return ret;