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

This commit is contained in:
2026-01-17 09:24:04 +03:00
parent 08943b5938
commit 2027bbb513
2 changed files with 17 additions and 7 deletions
+4 -1
View File
@@ -11,6 +11,7 @@
#include "../DAO/MemoryAuthDAO.h"
#include "../DAO/MySQLUserDAO.h"
#include "../DAO/MySQLMedicationsDAO.h"
#include "../DAO/MySQLDiariesDAO.h"
namespace uad
{
@@ -24,13 +25,15 @@ void HandleRequest(
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 std::shared_ptr<IDiariesDAO> diaries_dao = std::make_shared<MySqlDiariesDAO>(GetMySqlSession());
static RootExecutor<Body, Allocator, boost::beast::http::string_body, Send> root_executor(
GetMySqlSession(),
user_dao,
auth_dao,
medications_dao,
user_treatment_schemes_dao
user_treatment_schemes_dao,
diaries_dao
);
root_executor(doc_root, std::move(req), std::forward<Send>(send));