mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
reduce scope of id
This commit is contained in:
@@ -76,10 +76,9 @@ void EMSESPDevicesService::all_devices(AsyncWebServerRequest * request) {
|
||||
|
||||
void EMSESPDevicesService::device_data(AsyncWebServerRequest * request, JsonVariant & json) {
|
||||
if (json.is<JsonObject>()) {
|
||||
uint8_t id = json["id"]; // get id from selected table row
|
||||
|
||||
AsyncJsonResponse * response = new AsyncJsonResponse(false, MAX_EMSESP_DEVICE_SIZE);
|
||||
#ifndef EMSESP_STANDALONE
|
||||
uint8_t id = json["id"]; // get id from selected table row
|
||||
EMSESP::device_info(id, (JsonObject &)response->getRoot());
|
||||
#endif
|
||||
response->setLength();
|
||||
|
||||
Reference in New Issue
Block a user