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

Function fetchAllPortals

public/js/adminPortals.js:551–560  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

549 }
550
551async function fetchAllPortals() {
552 const res = await fetch('/api/pro/portals/list.php', {
553 credentials: 'include',
554 headers: { 'X-CSRF-Token': window.csrfToken || '' }
555 });
556 const data = await safeJson(res);
557 return data && typeof data === 'object' && data.portals && typeof data.portals === 'object'
558 ? data.portals
559 : {};
560}
561
562async function saveAllPortals(portals) {
563 const res = await fetch('/api/pro/portals/save.php', {

Callers 1

loadClientPortalsListFunction · 0.85

Calls 1

safeJsonFunction · 0.70

Tested by

no test coverage detected