generated from Sithas/conan_template
Завершенная регистрация
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <boost/json.hpp>
|
||||
#include <mysqlx/xdevapi.h>
|
||||
#include <mysqlx/common/api.h>
|
||||
#include <boost/uuid.hpp>
|
||||
|
||||
#include "IExecutor.h"
|
||||
#include "../DAO/IUserDAO.h"
|
||||
@@ -94,13 +95,19 @@ public:
|
||||
user.SetLogin(login);
|
||||
user.SetPassword(password);
|
||||
|
||||
const auto uuid_stringified = user_dao_->Create(user);
|
||||
|
||||
http::response<ResponseType> res{
|
||||
http::status::created, req.version()
|
||||
};
|
||||
|
||||
response_body.as_object().emplace(
|
||||
"Result",
|
||||
"OK.Created."
|
||||
"uuid",
|
||||
uuid_stringified
|
||||
);
|
||||
response_body.as_object().emplace(
|
||||
"login",
|
||||
user.GetLogin()
|
||||
);
|
||||
|
||||
res.body() = serialize(response_body);
|
||||
|
||||
Reference in New Issue
Block a user