База для ручки 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
+4 -1
View File
@@ -5,6 +5,7 @@
#include "../db/mysql_connector.h"
#include "../DAO/IUserDAO.h"
#include "../DAO/IMedicationsDAO.h"
#include "../DAO/MySQLUserTreatmentSchemesDAO.h"
#include "AuthRegistrationExecutor.h"
#include "RootExecutor.h"
#include "../DAO/MemoryAuthDAO.h"
@@ -22,12 +23,14 @@ void HandleRequest(
static std::shared_ptr<IUserDAO> user_dao = std::make_shared<MySQLUserDAO>(GetMySqlSession());
static std::shared_ptr<IAuthDAO> auth_dao = std::make_shared<MemoryAuthDAO>(GetMySqlSession());
static std::shared_ptr<IMedicationsDAO> medications_dao = std::make_shared<MySQLMedicationsDAO>(GetMySqlSession());
static std::shared_ptr<IUserTreatmentSchemeDAO> user_treatment_schemes_dao = std::make_shared<MySQLUserTreatmentSchemesDAO>(GetMySqlSession());
static RootExecutor<Body, Allocator, boost::beast::http::string_body, Send> root_executor(
GetMySqlSession(),
user_dao,
auth_dao,
medications_dao
medications_dao,
user_treatment_schemes_dao
);
root_executor(doc_root, std::move(req), std::forward<Send>(send));