INNER CODE UNIT · JavaScript

apiFetch

XortexAI/XMem · admin/app.js:65

async function apiFetch(path) {
  const r = await fetch(`${API}${path}`, {
    headers: {'Authorization': `Bearer ${token}`},
    credentials: 'include'
  });
  if (r.status === 401) { logout(); return null; }
  return await r.json();
}

// ── Load all data ────────────────────────────────────────────────
async function loadAll() {
  loadOverview();
  loadLLM();
  loadGitHub();
  loadScanner();
  // Auto-refresh every 30s
  setInterval(() => {
    if (currentPage === 'overview') loadOverview();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…