Fix status endpoint and relay defaults

This commit is contained in:
2026-06-03 23:01:10 -06:00
parent 2b2bfa9bdc
commit 19e4d460a0
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
struct RelayState {
bool starlink = false;
bool fridge = true;
bool fridge = false;
};
extern RelayState relays;
@@ -175,9 +175,13 @@ void pollDashboardUart() {
}
void handleStatus() {
server.setContentLength(CONTENT_LENGTH_UNKNOWN);
server.send(200, "application/json", "");
sendStatus(server.client(), true);
DynamicJsonDocument doc(2048);
buildStatusDocument(doc);
String output;
serializeJson(doc, output);
server.send(200, "application/json", output);
}
void handleRelayHttp(const char* relayName, bool enabled) {