generated from Sithas/conan_template
Внесение в контроллеры Session MySQL и MySQLUserDAO
This commit is contained in:
@@ -1,20 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <mysqlx/xdevapi.h>
|
||||
#include <mysqlx/common/api.h>
|
||||
|
||||
#include "IExecutor.h"
|
||||
#include "../DAO/IUserDAO.h"
|
||||
|
||||
namespace uad
|
||||
{
|
||||
template <class Body, class Allocator, class ResponseType>
|
||||
class AuthRegistrationExecutor : public IExecutor<Body, Allocator, ResponseType>
|
||||
{
|
||||
mysqlx::Session& session_;
|
||||
std::shared_ptr<IUserDAO> user_dao_;
|
||||
|
||||
public:
|
||||
AuthRegistrationExecutor(mysqlx::Session& session,
|
||||
std::shared_ptr<IUserDAO> user_dao)
|
||||
: session_(session), user_dao_(user_dao)
|
||||
{
|
||||
}
|
||||
|
||||
boost::beast::http::response<ResponseType> operator ()(
|
||||
boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator>>&& req
|
||||
) override
|
||||
{
|
||||
boost::beast::http::response<ResponseType> res{
|
||||
boost::beast::http::status::ok, req.version()
|
||||
};
|
||||
boost::beast::http::status::ok, req.version()
|
||||
};
|
||||
|
||||
res.body() = "{ \"detail\": \"ok\"}";
|
||||
res.set(boost::beast::http::field::content_type, "application/json");
|
||||
|
||||
Reference in New Issue
Block a user