Upload via GUI (69 Dateien)
This commit is contained in:
@@ -40,6 +40,7 @@ async function callApi({ path: p, method = 'GET', query, body, auth = true, serv
|
||||
if (auth) {
|
||||
if (!session?.token) throw { status: 401, code: 'UNAUTHENTICATED', message: 'Nicht angemeldet.' };
|
||||
headers.Authorization = `Bearer ${session.token}`;
|
||||
headers['X-DeskHub-Authorization'] = `Bearer ${session.token}`; // Ersatz-Header: viele Hoster entfernen "Authorization"
|
||||
}
|
||||
const init = { method, headers };
|
||||
if (body !== undefined && method !== 'GET') { headers['Content-Type'] = 'application/json'; init.body = JSON.stringify(body); }
|
||||
|
||||
Reference in New Issue
Block a user