(key, index)
| 775 | return item; |
| 776 | } |
| 777 | function 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 | } |
| 783 | async function saveConfigItem(key, index, item){ |
| 784 | S.admin.saving = true; |
| 785 | S.suppressStatsReloadUntil = Date.now() + 8000; |
no test coverage detected