From 28a2f526bf06359c5a3d1b93c86c75d4671ce275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD?= Date: Tue, 6 Jan 2026 09:52:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=94=D0=90=D0=9E=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=BC=20?= =?UTF-8?q?=D0=BC=D0=B0=D1=80=D1=88=D1=80=D1=83=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/endpoints_handlers/RootExecutor.h | 2 +- .../UserGetMedicationsExecutor.h | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/endpoints_handlers/RootExecutor.h b/src/endpoints_handlers/RootExecutor.h index ca3659f..3d0e2fb 100644 --- a/src/endpoints_handlers/RootExecutor.h +++ b/src/endpoints_handlers/RootExecutor.h @@ -84,7 +84,7 @@ public: typename RouteController::HTTPMethodsToExecutors{ { boost::beast::http::verb::get, - std::make_shared() + std::make_shared(session_, auth_dao_, medications_dao_) } } ); diff --git a/src/endpoints_handlers/UserGetMedicationsExecutor.h b/src/endpoints_handlers/UserGetMedicationsExecutor.h index ef3dea3..90c3398 100644 --- a/src/endpoints_handlers/UserGetMedicationsExecutor.h +++ b/src/endpoints_handlers/UserGetMedicationsExecutor.h @@ -6,7 +6,8 @@ #include #include "IExecutor.h" -#include "../DAO/IUserDAO.h" +#include "../DAO/IAuthDAO.h" +#include "../DAO/IMedicationsDAO.h" #include "../exceptions/session_exception.h" namespace uad @@ -14,8 +15,18 @@ namespace uad template class UserGetMedicationsExecutor : public IExecutor { + mysqlx::Session& session_; + const std::shared_ptr& auth_dao_; + const std::shared_ptr& medications_dao_; public: - UserGetMedicationsExecutor() = default; + UserGetMedicationsExecutor( + mysqlx::Session& session, + const std::shared_ptr& auth_dao, + const std::shared_ptr& medications_dao + ): session_(session), auth_dao_(auth_dao), medications_dao_(medications_dao) + { + + } boost::beast::http::response operator ()( boost::beast::http::request>&& req