generated from Sithas/conan_template
Упаковка контроллеров и Executor'ов
This commit is contained in:
@@ -14,20 +14,20 @@ class RootExecutor : public IExecutor<Body, Allocator, ResponseType>
|
||||
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>>;
|
||||
|
||||
private:
|
||||
RoutesPathes routes_pathes_;
|
||||
|
||||
public:
|
||||
RootExecutor()
|
||||
{
|
||||
typename RouteController::HTTPMethodsToExecutors authorization_registration_executors {
|
||||
{boost::beast::http::verb::post, std::make_shared<RouteAuthRegistrationExecutor>()}
|
||||
};
|
||||
|
||||
routes_pathes_["/api/v1/Auth/Register"] = std::make_unique<RouteController>(
|
||||
std::move(authorization_registration_executors)
|
||||
);
|
||||
|
||||
typename RouteController::HTTPMethodsToExecutors{
|
||||
{boost::beast::http::verb::post, std::make_shared<RouteAuthRegistrationExecutor>()}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
boost::beast::http::response<ResponseType> operator ()(
|
||||
boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator>>&& req
|
||||
) override
|
||||
|
||||
Reference in New Issue
Block a user