v1.3.27: fix Help modal — add -L flag, demo-login docs
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
// API-вызовы и авторизация
|
||||
/* api.js — HTTP-утилиты */
|
||||
|
||||
function authHeaders() {
|
||||
return {
|
||||
'X-Auth-Token': localStorage.getItem('auth_token') || '',
|
||||
'X-Auth-Env': localStorage.getItem('auth_env') || 'test'
|
||||
};
|
||||
}
|
||||
|
||||
async function getJSON(url) {
|
||||
const r = await fetch(url, { headers: authHeaders() });
|
||||
|
||||
Reference in New Issue
Block a user