📷 Merges camera setting service and camera service

This commit is contained in:
Rune Harlyk
2024-11-14 14:58:47 +01:00
committed by Rune Harlyk
parent 0cce6075b9
commit 0d596d9d3c
5 changed files with 64 additions and 118 deletions
+2 -3
View File
@@ -77,9 +77,9 @@ void Spot::setupServer() {
_server->on("/api/camera/stream", HTTP_GET,
[this](PsychicRequest *request) { return _cameraService.cameraStream(request); });
_server->on("/api/camera/settings", HTTP_GET,
[this](PsychicRequest *request) { return _cameraSettingsService.endpoint.getState(request); });
[this](PsychicRequest *request) { return _cameraService.endpoint.getState(request); });
_server->on("/api/camera/settings", HTTP_POST, [this](PsychicRequest *request, JsonVariant &json) {
return _cameraSettingsService.endpoint.handleStateUpdate(request, json);
return _cameraService.endpoint.handleStateUpdate(request, json);
});
// SYSTEM
@@ -198,7 +198,6 @@ void Spot::startServices() {
#endif
#if FT_ENABLED(USE_CAMERA)
_cameraService.begin();
_cameraSettingsService.begin();
#endif
}