mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
fix compiling local test
This commit is contained in:
@@ -62,6 +62,13 @@ void WebAPIService::webAPIService(AsyncWebServerRequest * request, JsonVariant j
|
||||
parse(request, input);
|
||||
}
|
||||
|
||||
#ifdef EMSESP_TEST
|
||||
// for test.cpp so we can invoke GETs to test the API
|
||||
void WebAPIService::webAPIService(AsyncWebServerRequest * request) {
|
||||
JsonDocument input_doc;
|
||||
parse(request, input_doc.to<JsonObject>());
|
||||
}
|
||||
#endif
|
||||
|
||||
// parse the URL looking for query or path parameters
|
||||
// reporting back any errors
|
||||
|
||||
@@ -34,6 +34,11 @@ class WebAPIService {
|
||||
|
||||
void webAPIService(AsyncWebServerRequest * request, JsonVariant json);
|
||||
|
||||
#ifdef EMSESP_TEST
|
||||
// for test.cpp
|
||||
void webAPIService(AsyncWebServerRequest * request);
|
||||
#endif
|
||||
|
||||
static uint32_t api_count() {
|
||||
return api_count_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user