mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
use standard JSON sizes from main EMS-ESP header
This commit is contained in:
@@ -45,7 +45,7 @@ void WebDevicesService::scan_devices(AsyncWebServerRequest * request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebDevicesService::all_devices(AsyncWebServerRequest * request) {
|
void WebDevicesService::all_devices(AsyncWebServerRequest * request) {
|
||||||
AsyncJsonResponse * response = new AsyncJsonResponse(false, MAX_EMSESP_DEVICE_SIZE);
|
AsyncJsonResponse * response = new AsyncJsonResponse(false, EMSESP_MAX_JSON_SIZE_LARGE_DYN);
|
||||||
JsonObject root = response->getRoot();
|
JsonObject root = response->getRoot();
|
||||||
|
|
||||||
JsonArray devices = root.createNestedArray("devices");
|
JsonArray devices = root.createNestedArray("devices");
|
||||||
@@ -80,7 +80,7 @@ void WebDevicesService::all_devices(AsyncWebServerRequest * request) {
|
|||||||
|
|
||||||
void WebDevicesService::device_data(AsyncWebServerRequest * request, JsonVariant & json) {
|
void WebDevicesService::device_data(AsyncWebServerRequest * request, JsonVariant & json) {
|
||||||
if (json.is<JsonObject>()) {
|
if (json.is<JsonObject>()) {
|
||||||
AsyncJsonResponse * response = new AsyncJsonResponse(false, MAX_EMSESP_DEVICE_SIZE);
|
AsyncJsonResponse * response = new AsyncJsonResponse(false, EMSESP_MAX_JSON_SIZE_LARGE_DYN);
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
uint8_t id = json["id"]; // get id from selected table row
|
uint8_t id = json["id"]; // get id from selected table row
|
||||||
EMSESP::device_info_web(id, (JsonObject &)response->getRoot());
|
EMSESP::device_info_web(id, (JsonObject &)response->getRoot());
|
||||||
|
|||||||
Reference in New Issue
Block a user