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

Function configItemPath

web/js/app.js:777–782  ·  view source on GitHub ↗
(key, index)

Source from the content-addressed store, hash-verified

775 return item;
776}
777function configItemPath(key, index){
778 if(index < 0) return `/api/${key}`;
779 const current = configItems()[index] || {};
780 const id = key === 'servers' ? current.username : String(index);
781 return `/api/${key}/${encodeURIComponent(id || String(index))}`;
782}
783async function saveConfigItem(key, index, item){
784 S.admin.saving = true;
785 S.suppressStatsReloadUntil = Date.now() + 8000;

Callers 2

saveConfigItemFunction · 0.85
deleteConfigItemFunction · 0.85

Calls 1

configItemsFunction · 0.85

Tested by

no test coverage detected