From 11641e3fa15cd67c7d1c7bd2f5ee755676e66370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD?= Date: Tue, 13 Jan 2026 08:33:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B7=D0=B0=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D1=80=D1=83=D1=87=D0=BA=D0=B8=20PostUserMedicationsExecutor?= =?UTF-8?q?.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/endpoints_handlers/IExecutor.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/endpoints_handlers/IExecutor.h b/src/endpoints_handlers/IExecutor.h index 7142c59..ab7a675 100644 --- a/src/endpoints_handlers/IExecutor.h +++ b/src/endpoints_handlers/IExecutor.h @@ -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 operator ()( + boost::beast::http::request>&& req + ) override + { + // Логика проверки авторизации + // передать управление следующему executorу - возврат req + // посмотреть chain of responsibility, composite + // выбрасывать исключение здесь + return next_executor_(req); + } +}; }