База для ручки PostUserMedicationsExecutor.h

This commit is contained in:
2026-01-08 12:20:51 +03:00
parent 8657b2910b
commit 50bad13f86
3 changed files with 9 additions and 7 deletions
@@ -46,7 +46,7 @@ public:
if (req[http::field::authorization].size() <= auth_prefix.size())
{
BOOST_LOG_TRIVIAL(info) << invalid_token_message;
BOOST_LOG_TRIVIAL(error) << invalid_token_message;
throw session_exception(http::status::unauthorized, "Unauthorized");
}
@@ -54,7 +54,7 @@ public:
if (!auth_dao_->HasAuthorized(auth_token))
{
BOOST_LOG_TRIVIAL(info) << invalid_token_message;
BOOST_LOG_TRIVIAL(error) << invalid_token_message;
throw session_exception(http::status::unauthorized, "Unauthorized");
}
@@ -46,7 +46,7 @@ public:
if (req[http::field::authorization].size() <= auth_prefix.size())
{
BOOST_LOG_TRIVIAL(info) << invalid_token_message;
BOOST_LOG_TRIVIAL(error) << invalid_token_message;
throw session_exception(http::status::unauthorized, "Unauthorized");
}
@@ -54,7 +54,7 @@ public:
if (!auth_dao_->HasAuthorized(auth_token))
{
BOOST_LOG_TRIVIAL(info) << invalid_token_message;
BOOST_LOG_TRIVIAL(error) << invalid_token_message;
throw session_exception(http::status::unauthorized, "Unauthorized");
}
+5 -3
View File
@@ -14,9 +14,11 @@ void InitLogs()
logging::keywords::file_name = "app_%Y-%m-%d_%H-%M-%S.log",
logging::keywords::rotation_size = 10 * 1024 * 1024,
logging::keywords::time_based_rotation =
logging::sinks::file::rotation_at_time_point(0, 0, 0),
logging::keywords::format = "[%TimeStamp%] [%Severity%]: %Message%"
);
logging::sinks::file::rotation_at_time_point(0, 0, 0),
logging::keywords::format =
"[%TimeStamp%] [%Severity%]: %Message%"
);
logging::add_common_attributes();
}
}