generated from Sithas/conan_template
Рабочая сборка с третьей ручкой
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Controller.h"
|
||||
#include "AuthRegistrationExecutor.h"
|
||||
#include "AuthLoginExecutor.h"
|
||||
#include "AuthLogoutExecutor.h"
|
||||
#include "../DAO/IUserDAO.h"
|
||||
#include "../DAO/IAuthDAO.h"
|
||||
#include "./../helpers/helpers.h"
|
||||
@@ -17,6 +18,8 @@ class RootExecutor
|
||||
Body, Allocator, boost::beast::http::string_body>;
|
||||
using RouteAuthLoginExecutor = AuthLoginExecutor<
|
||||
Body, Allocator, boost::beast::http::string_body>;
|
||||
using RouteAuthLogoutExecutor = AuthLogoutExecutor<
|
||||
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>>;
|
||||
@@ -53,6 +56,13 @@ public:
|
||||
std::make_shared<RouteAuthLoginExecutor>(session_, user_dao_, auth_dao_)}
|
||||
}
|
||||
);
|
||||
|
||||
routes_pathes_["/api/v1/Auth/Logout"] = std::make_unique<RouteController>(
|
||||
typename RouteController::HTTPMethodsToExecutors{
|
||||
{boost::beast::http::verb::post,
|
||||
std::make_shared<RouteAuthLogoutExecutor>(session_, user_dao_, auth_dao_)}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void operator ()(
|
||||
|
||||
Reference in New Issue
Block a user