MCPcopy Create free account
hub / github.com/cesanta/mongoose / oncommit

Function oncommit

tutorials/http/device-dashboard/web_root/main.js:211–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 const refresh = () => fetch('api/firmware/status').then(r => r.json()).then(r => setInfo(r));
210 useEffect(refresh, []);
211 const oncommit = ev => fetch('api/firmware/commit')
212 .then(r => r.json())
213 .then(refresh);
214 const onreboot = ev => fetch('api/device/reset')
215 .then(r => r.json())
216 .then(r => new Promise(r => setTimeout(ev => { refresh(); r(); }, 3000)));

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected