move the Get* endpoints to their right service classes

This commit is contained in:
proddy
2024-08-29 13:53:27 +02:00
parent e2aabb1418
commit 19922ca9fb
14 changed files with 114 additions and 115 deletions

View File

@@ -22,13 +22,14 @@
#define EMSESP_CUSTOMIZATION_FILE "/config/emsespCustomization.json"
// GET
#define DEVICES_SERVICE_PATH "/rest/devices"
#define DEVICE_ENTITIES_PATH "/rest/deviceEntities"
#define EMSESP_DEVICES_SERVICE_PATH "/rest/devices"
#define EMSESP_DEVICE_ENTITIES_PATH "/rest/deviceEntities"
#define EMSESP_GET_CUSTOMIZATIONS_PATH "/rest/getCustomizations"
// POST
#define CUSTOMIZATION_ENTITIES_PATH "/rest/customizationEntities"
#define RESET_CUSTOMIZATION_SERVICE_PATH "/rest/resetCustomizations"
#define WRITE_DEVICE_NAME_PATH "/rest/writeDeviceName"
#define EMSESP_CUSTOMIZATION_ENTITIES_PATH "/rest/customizationEntities"
#define EMSESP_RESET_CUSTOMIZATION_SERVICE_PATH "/rest/resetCustomizations"
#define EMSESP_WRITE_DEVICE_NAME_PATH "/rest/writeDeviceName"
namespace emsesp {
@@ -99,6 +100,7 @@ class WebCustomizationService : public StatefulService<WebCustomization> {
// GET
void devices(AsyncWebServerRequest * request);
void device_entities(AsyncWebServerRequest * request);
void getCustomizations(AsyncWebServerRequest * request);
// POST
void customization_entities(AsyncWebServerRequest * request, JsonVariant json);