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

This commit is contained in:
2026-01-16 07:40:00 +03:00
parent 11641e3fa1
commit f56c14b3da
7 changed files with 150 additions and 21 deletions
+20 -20
View File
@@ -14,24 +14,24 @@ public:
virtual ~IExecutor() = default;
};
class IAuthorizable : public IExecutor
{
IExecutor& next_executor_;
public:
IAuthorizable(IExecutor& next_executor): next_executor_(next_executor)
{
}
boost::beast::http::response<ResponseType> operator ()(
boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator>>&& req
) override
{
// Логика проверки авторизации
// передать управление следующему executorу - возврат req
// посмотреть chain of responsibility, composite
// выбрасывать исключение здесь
return next_executor_(req);
}
};
// class IAuthorizable : public IExecutor
// {
// IExecutor& next_executor_;
// public:
// IAuthorizable(IExecutor& next_executor): next_executor_(next_executor)
// {
//
// }
//
// boost::beast::http::response<ResponseType> operator ()(
// boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator>>&& req
// ) override
// {
// // Логика проверки авторизации
// // передать управление следующему executorу - возврат req
// // посмотреть chain of responsibility, composite
// // выбрасывать исключение здесь
// return next_executor_(req);
// }
// };
}