База для ручки PostUserMedicationsExecutor.h

This commit is contained in:
2026-01-10 17:24:17 +03:00
parent 8eb44b6e45
commit a81952e40e
6 changed files with 17 additions and 10 deletions
+8 -2
View File
@@ -12,6 +12,7 @@
#include "../DAO/IUserDAO.h"
#include "../DAO/IAuthDAO.h"
#include "../DAO/IMedicationsDAO.h"
#include "../DAO/IUserTreatmentSchemesDAO.h"
#include "./../helpers/helpers.h"
#include "./../exceptions/session_exception.h"
@@ -45,14 +46,19 @@ private:
const std::shared_ptr<IUserDAO>& user_dao_;
const std::shared_ptr<IAuthDAO>& auth_dao_;
const std::shared_ptr<IMedicationsDAO>& medications_dao_;
const std::shared_ptr<IUserTreatmentSchemeDAO>& user_treatment_scheme_dao_;
public:
RootExecutor(
mysqlx::Session& session,
const std::shared_ptr<IUserDAO>& user_dao,
const std::shared_ptr<IAuthDAO>& auth_dao,
const std::shared_ptr<IMedicationsDAO>& medications_dao) :
session_(session), user_dao_(user_dao), auth_dao_(auth_dao), medications_dao_(medications_dao)
const std::shared_ptr<IMedicationsDAO>& medications_dao,
const std::shared_ptr<IUserTreatmentSchemeDAO>& user_treatment_scheme_dao
) :
session_(session), user_dao_(user_dao),
auth_dao_(auth_dao), medications_dao_(medications_dao),
user_treatment_scheme_dao_(user_treatment_scheme_dao)
{
routes_pathes_["/api/v1/Auth/Register"] = std::make_unique<RouteController>(
typename RouteController::HTTPMethodsToExecutors{