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

Function fetchAllGroups

public/js/adminFolderAccess.js:781–791  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

779}
780
781async function fetchAllGroups() {
782 if (window.__FR_IS_PRO !== true) return {};
783 const res = await fetch('/api/pro/groups/list.php', {
784 credentials: 'include',
785 headers: { 'X-CSRF-Token': window.csrfToken || '' }
786 });
787 const data = await safeJson(res);
788 return data && typeof data === 'object' && data.groups && typeof data.groups === 'object'
789 ? data.groups
790 : {};
791}
792
793async function saveAllGroups(groups) {
794 const res = await fetch('/api/pro/groups/save.php', {

Callers 3

loadUserPermissionsListFunction · 0.85
loadUserPermissionsListFunction · 0.85
loadUserGroupsListFunction · 0.85

Calls 1

safeJsonFunction · 0.70

Tested by

no test coverage detected