generated from Sithas/conan_template
Рабочая сборка с третьей ручкой
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
using namespace boost::beast;
|
||||
using namespace std::string_literals;
|
||||
|
||||
auto body = req.body();
|
||||
const auto body = req.body();
|
||||
value req_json;
|
||||
value response_body;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
std::optional<user> maybe_user = user_dao_->GetByLogin(login);
|
||||
const std::optional<user> maybe_user = user_dao_->GetByLogin(login);
|
||||
|
||||
if (!maybe_user.has_value() || maybe_user.value().hashed_password != HashPassword(password))
|
||||
{
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
return res;
|
||||
}
|
||||
auto token = GenerateUUID();
|
||||
const std::string token = GenerateUUID();
|
||||
auth_dao_->Login(maybe_user.value().uuid, token);
|
||||
|
||||
http::response<ResponseType> res{http::status::ok, req.version()};
|
||||
|
||||
Reference in New Issue
Block a user