Added Update API endpoint
All checks were successful
Test compiling project / test (push) Successful in 2m30s
All checks were successful
Test compiling project / test (push) Successful in 2m30s
This commit is contained in:
@@ -12,6 +12,7 @@ extern DeviceTelemetry telemetry;
|
||||
extern NetworkData wifi_data;
|
||||
extern NetworkData ethernet_data;
|
||||
extern SensorData shunt_data;
|
||||
extern OTAStatus ota_status;
|
||||
|
||||
extern AsyncWebServer server;
|
||||
|
||||
@@ -36,4 +37,10 @@ void setup_api_endpoints(){
|
||||
serializeJson(build_network_json(ethernet_data, wifi_data), output);
|
||||
request->send(200, "application/json", output);
|
||||
});
|
||||
|
||||
server.on("/ota_udpate_status", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
String output;
|
||||
serializeJson(build_ota_json(ota_status), output);
|
||||
request->send(200, "application/json", output);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user