MCPcopy
hub / github.com/Alishahryar1/free-claude-code / apply

Function apply

api/admin_static/admin.js:382–408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

380}
381
382async function apply() {
383 const result = await api("/admin/api/config/apply", {
384 method: "POST",
385 body: JSON.stringify({ values: changedValues() }),
386 });
387 if (!result.applied) {
388 showValidationResult(result);
389 return;
390 }
391 const restart = result.restart || {};
392 if (restart.required && restart.automatic) {
393 showMessage("Applied. Restarting server...", "ok");
394 byId("applyButton").disabled = true;
395 setTimeout(() => {
396 window.location.href = restart.admin_url || "/admin";
397 }, 1600);
398 return;
399 }
400 const pending = restart.required ? restart.fields || [] : result.pending_fields || [];
401 await load();
402 showMessage(
403 pending.length
404 ? `Applied. Restart fcc-server to use: ${pending.join(", ")}`
405 : "Applied",
406 "ok",
407 );
408}
409
410async function refreshLocalStatus() {
411 const result = await api("/admin/api/providers/local-status");

Callers

nothing calls this directly

Calls 6

apiFunction · 0.85
changedValuesFunction · 0.85
showValidationResultFunction · 0.85
showMessageFunction · 0.85
byIdFunction · 0.85
loadFunction · 0.85

Tested by

no test coverage detected