Refactor OTA API

This commit is contained in:
Sergio R. Caprile committed 2024-10-24 19:08:06 -03:00
1 parent 3319ce78d3
commit 9b99f62311
27 files changed
+1716 -2143

No files matched your search

-1
View File
@@ -241,7 +241,6 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
} else if (mg_match(hm->uri, mg_str("/api/modbus/exec"), NULL)) {
handle_modbus_exec(c, hm->body);
} else if (mg_match(hm->uri, mg_str("/api/device/reset"), NULL)) {
mg_timer_add(c->mgr, 500, 0, (void (*)(void *)) mg_device_reset, NULL);
mg_http_reply(c, 200, s_json_header, "true\n");
} else {
struct mg_http_serve_opts opts;