validator edits

This commit is contained in:
Dobromir Popov
2026-07-04 23:03:03 +02:00
parent 69b0e726b8
commit 9bd15de65b
6 changed files with 425 additions and 53 deletions

View File

@@ -75,7 +75,10 @@ const short = (s, n=14) => { s = String(s); return s.length > n ? s.slice(0, 6)
async function fetchJson(path) {
try {
const r = await fetch(path);
const headers = {};
const token = localStorage.getItem("meshnet_session");
if (token) headers["Authorization"] = "Bearer " + token;
const r = await fetch(path, { headers });
if (!r.ok) return null;
return await r.json();
} catch { return null; }