Рабочая сборка второго executor'а

This commit is contained in:
Антон
2025-09-20 11:41:31 +03:00
parent c7bd64ec9b
commit b6ddf88a61
6 changed files with 31 additions and 7 deletions
@@ -9,6 +9,7 @@
#include "IExecutor.h"
#include "../DAO/IUserDAO.h"
#include "../DAO/IAuthDAO.h"
#include "../helpers/helpers.h"
namespace uad
{
@@ -74,6 +75,17 @@ public:
return res;
}
auto token = GenerateUUID();
auth_dao_->Login(user.value().GetUUID(), token);
http::response<ResponseType> res{http::status::ok, req.version()};
response_body.as_object().emplace("token", token);
res.body() = serialize(response_body);
res.set(http::field::content_type, "application/json");
res.content_length(res.body().size());
return res;
}
catch (const system::system_error& err)
{