MCPcopy Create free account
hub / github.com/error311/FileRise / apiGet

Function apiGet

public/js/adminPanel.js:3410–3424  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

3408 };
3409
3410 const apiGet = async (url) => {
3411 const res = await fetch(withBase(url), {
3412 method: 'GET',
3413 credentials: 'include',
3414 headers: { 'Accept': 'application/json' },
3415 });
3416 const data = await safeJson(res);
3417 if (!res.ok || !data) {
3418 throw new Error(data?.error || tf('error', 'Error'));
3419 }
3420 if (data.ok !== true) {
3421 throw new Error(data?.error || tf('error', 'Error'));
3422 }
3423 return data;
3424 };
3425
3426 const apiPost = async (url, payload = {}) => {
3427 const res = await fetch(withBase(url), {

Callers 3

loadManagedStatusesFunction · 0.70
loadMcpServiceStatusFunction · 0.70
loadMcpUsersFunction · 0.70

Calls 3

withBaseFunction · 0.85
safeJsonFunction · 0.70
tfFunction · 0.70

Tested by

no test coverage detected