generated from Sithas/conan_template
Внесение в контроллеры Session MySQL и MySQLUserDAO
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "IController.h"
|
||||
#include "Controller.h"
|
||||
#include "AuthRegistrationExecutor.h"
|
||||
#include "../DAO/IUserDAO.h"
|
||||
#include "./../helpers/helpers.h"
|
||||
|
||||
namespace uad
|
||||
@@ -22,13 +23,16 @@ class RootExecutor
|
||||
|
||||
private:
|
||||
RoutesPathes routes_pathes_;
|
||||
mysqlx::Session& session_;
|
||||
std::shared_ptr<IUserDAO> user_dao_;
|
||||
|
||||
public:
|
||||
RootExecutor()
|
||||
RootExecutor(mysqlx::Session& session, std::shared_ptr<IUserDAO> user_dao)
|
||||
: session_(session), user_dao_(user_dao)
|
||||
{
|
||||
routes_pathes_["/api/v1/Auth/Register"] = std::make_unique<RouteController>(
|
||||
typename RouteController::HTTPMethodsToExecutors{
|
||||
{boost::beast::http::verb::get, std::make_shared<RouteAuthRegistrationExecutor>()}
|
||||
{boost::beast::http::verb::post, std::make_shared<RouteAuthRegistrationExecutor>(session_, user_dao_)}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user