mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
minor uodates to routing
This commit is contained in:
@@ -208,15 +208,13 @@ esp_err_t WebCustomizationService::device_entities(PsychicRequest * request) {
|
||||
PsychicJsonResponse response = PsychicJsonResponse(request, true, EMSESP_JSON_SIZE_XXXXLARGE, true); // is array and also msgpack
|
||||
JsonArray output = response.getRoot();
|
||||
|
||||
// TODO add back memory management
|
||||
// TODO add back memory managegement. Be careful we do need to free()/delete() any object we extend with new()
|
||||
// while (!response) {
|
||||
// delete response;
|
||||
// buffer -= 1024;
|
||||
// // response = new MsgpackAsyncJsonResponse(true, buffer);
|
||||
// }
|
||||
|
||||
// TODO add msgpack
|
||||
|
||||
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||
if (emsdevice->unique_id() == id) {
|
||||
#ifndef EMSESP_STANDALONE
|
||||
|
||||
@@ -178,7 +178,7 @@ esp_err_t WebDataService::device_data(PsychicRequest * request) {
|
||||
PsychicJsonResponse response = PsychicJsonResponse(request, false, EMSESP_JSON_SIZE_XXXXLARGE, true); // is jsonobject and also msgpack
|
||||
JsonObject output = response.getRoot();
|
||||
|
||||
// TODO add back memory management?
|
||||
// TODO add back memory managegement. Be careful we do need to free()/delete() any object we extend with new()
|
||||
// check size
|
||||
// while (!response) {
|
||||
// delete response;
|
||||
|
||||
@@ -80,7 +80,7 @@ void WebLogService::registerURI() {
|
||||
return request->reply(200);
|
||||
});
|
||||
|
||||
// TODO remove?
|
||||
// TODO this can be removed when ported over
|
||||
// server->addHandler(&events_);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,11 @@ class WebLogService : public uuid::log::Handler {
|
||||
virtual void operator<<(std::shared_ptr<uuid::log::Message> message);
|
||||
|
||||
private:
|
||||
PsychicEventSource _events;
|
||||
SecurityManager * _securityManager;
|
||||
PsychicHttpServer * _server;
|
||||
|
||||
PsychicEventSource _events;
|
||||
|
||||
class QueuedLogMessage {
|
||||
public:
|
||||
QueuedLogMessage(unsigned long id, std::shared_ptr<uuid::log::Message> && content);
|
||||
@@ -65,9 +66,6 @@ class WebLogService : public uuid::log::Handler {
|
||||
void transmit(const QueuedLogMessage & message);
|
||||
char * messagetime(char * out, const uint64_t t, const size_t bufsize);
|
||||
|
||||
// TODO remove this?
|
||||
// PsychicJsonHandler setValues_; // for POSTs
|
||||
|
||||
esp_err_t fetchLog(PsychicRequest * request);
|
||||
esp_err_t getValues(PsychicRequest * request);
|
||||
esp_err_t setValues(PsychicRequest * request, JsonVariant & json);
|
||||
|
||||
Reference in New Issue
Block a user