@@ -390,7 +390,6 @@ static double computeNextAlignedEpoch(double epoch, uint8_t baseHour, uint32_t i
390390static void scheduleNextSummaryFetch ();
391391static void fetchViewerSummary ();
392392static void handleViewerSummary (JsonDocument &doc, double epoch);
393- static void handleRefreshPost (EthernetClient &client, const String &body);
394393
395394void setup () {
396395 Serial.begin (115200 );
@@ -575,8 +574,6 @@ static void handleWebRequests() {
575574 sendDashboard (client);
576575 } else if (method == " GET" && path == " /api/tanks" ) {
577576 sendTankJson (client);
578- } else if (method == " POST" && path == " /api/refresh" ) {
579- handleRefreshPost (client, body);
580577 } else {
581578 respondStatus (client, 404 , " Not Found" );
582579 }
@@ -835,27 +832,3 @@ static void handleViewerSummary(JsonDocument &doc, double epoch) {
835832 Serial.print (gTankRecordCount );
836833 Serial.println (F (" tanks)" ));
837834}
838-
839- static void handleRefreshPost (EthernetClient &client, const String &body) {
840- char clientUid[48 ] = {0 };
841- if (body.length () > 0 ) {
842- DynamicJsonDocument doc (128 );
843- if (deserializeJson (doc, body) == DeserializationError::Ok) {
844- const char *uid = doc[" client" ] | " " ;
845- if (uid && *uid) {
846- strlcpy (clientUid, uid, sizeof (clientUid));
847- }
848- }
849- }
850-
851- if (clientUid[0 ]) {
852- Serial.print (F (" Viewer manual refresh requested for client " ));
853- Serial.println (clientUid);
854- } else {
855- Serial.println (F (" Viewer manual refresh requested for all sites" ));
856- }
857-
858- fetchViewerSummary ();
859- scheduleNextSummaryFetch ();
860- sendTankJson (client);
861- }
0 commit comments