MCPcopy Create free account
hub / github.com/cppla/ServerStatus / adminHeaders

Function adminHeaders

web/js/app.js:586–588  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

584}
585
586function adminHeaders(){
587 return { 'Content-Type': 'application/json', 'Authorization': `Bearer ${S.admin.token}` };
588}
589async function api(path, options = {}){
590 const res = await fetch(path, { ...options, headers: { ...(options.headers || {}), ...(options.auth === false ? {} : adminHeaders()) } });
591 const data = await res.json().catch(() => ({}));

Callers 1

apiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected