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

This commit is contained in:
2026-01-13 08:33:54 +03:00
parent 5a77e9db8a
commit 11641e3fa1
+21
View File
@@ -13,4 +13,25 @@ public:
) = 0;
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);
}
};
}