MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / api

Function api

deployments/desktop/static/app.js:255–268  ·  view source on GitHub ↗
(path, options = {})

Source from the content-addressed store, hash-verified

253}
254
255async function api(path, options = {}) {
256 if (DEMO_MODE) {
257 return demoApi(path, options);
258 }
259 const response = await fetch(path, {
260 headers: { "Content-Type": "application/json" },
261 ...options,
262 });
263 const data = await response.json();
264 if (!response.ok || !data.ok) {
265 throw new Error(localizeError(data.error || `Request failed: ${path}`));
266 }
267 return data;
268}
269
270function parseDemoBody(options) {
271 if (!options || !options.body) return {};

Callers 15

loadReportContentFunction · 0.70
refreshReportsFunction · 0.70
loadUsersFunction · 0.70
loadRolesFunction · 0.70
loadSourceOptionsFunction · 0.70
updateRoleFunction · 0.70
syncRoleForUserFunction · 0.70
createRoleFunction · 0.70
refreshProfileFunction · 0.70
loadLatestPushFunction · 0.70
refreshDailyTaskStatusFunction · 0.70
runDailyFunction · 0.70

Calls 3

localizeErrorFunction · 0.85
demoApiFunction · 0.70
jsonMethod · 0.45

Tested by

no test coverage detected