Put Diary

This commit is contained in:
2026-01-25 15:08:30 +03:00
parent b3007c1471
commit e4104e9707
7 changed files with 186 additions and 9 deletions
+8 -1
View File
@@ -16,6 +16,7 @@
#include "PostUserMedicationsExecutor.h"
#include "GetDiariesExecutor.h"
#include "PostDiaryExecutor.h"
#include "PutDiaryExecutor.h"
#include "../DAO/IUserDAO.h"
#include "../DAO/IAuthDAO.h"
#include "../DAO/IDiariesDAO.h"
@@ -48,6 +49,8 @@ class RootExecutor
Body, Allocator, boost::beast::http::string_body>;
using RoutePostDiaryExecutor = PostDiaryExecutor<
Body, Allocator, boost::beast::http::string_body>;
using RoutePutDiaryExecutor = PutDiaryExecutor<
Body, Allocator, boost::beast::http::string_body>;
using IRouteController = IController<Body, Allocator, boost::beast::http::string_body>;
using RouteController = Controller<Body, Allocator, boost::beast::http::string_body>;
using RoutesPathes = std::unordered_map<std::string, std::unique_ptr<IRouteController>>;
@@ -203,7 +206,11 @@ public:
if (req.method() == boost::beast::http::verb::put)
{
return send(PutDiaryExecutor<Body, Allocator, ResponseType>(
session_,
auth_dao_,
diaries_dao_
)(std::move(req), uuid));
}
}