mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-12 01:40:52 +01:00
Save flash: Move WebApi json parsing to separate method to prevent a lot of redundant code
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "WebApi_webapp.h"
|
||||
#include "WebApi_ws_console.h"
|
||||
#include "WebApi_ws_live.h"
|
||||
#include <AsyncJson.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <TaskSchedulerDeclarations.h>
|
||||
|
||||
@@ -37,6 +38,8 @@ public:
|
||||
|
||||
static void writeConfig(JsonVariant& retMsg, const WebApiError code = WebApiError::GenericSuccess, const String& message = "Settings saved!");
|
||||
|
||||
static bool parseRequestData(AsyncWebServerRequest* request, AsyncJsonResponse* response, DynamicJsonDocument& json_document, size_t max_document_size = 1024);
|
||||
|
||||
private:
|
||||
AsyncWebServer _server;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user