♻️ Major clean up of project structure
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <PsychicHttp.h>
|
||||
|
||||
#include <event_socket.h>
|
||||
// #include <event_socket.h>
|
||||
#include <template/stateful_service.h>
|
||||
|
||||
template <class T>
|
||||
@@ -15,10 +15,10 @@ class EventEndpoint {
|
||||
}
|
||||
|
||||
void begin() {
|
||||
socket.onEvent(_event,
|
||||
std::bind(&EventEndpoint::updateState, this, std::placeholders::_1, std::placeholders::_2));
|
||||
socket.onSubscribe(_event,
|
||||
std::bind(&EventEndpoint::syncState, this, std::placeholders::_1, std::placeholders::_2));
|
||||
// socket.onEvent(_event,
|
||||
// std::bind(&EventEndpoint::updateState, this, std::placeholders::_1, std::placeholders::_2));
|
||||
// socket.onSubscribe(_event,
|
||||
// std::bind(&EventEndpoint::syncState, this, std::placeholders::_1, std::placeholders::_2));
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -35,6 +35,6 @@ class EventEndpoint {
|
||||
JsonDocument jsonDocument;
|
||||
JsonVariant root = jsonDocument.to<JsonVariant>();
|
||||
_statefulService->read(root, _stateReader);
|
||||
socket.emit(_event, root, originId.c_str(), sync);
|
||||
// socket.emit(_event, root, originId.c_str(), sync);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user