generated from Sithas/conan_template
База для ручки PostUserMedicationsExecutor.h
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
if (req[http::field::authorization].size() <= auth_prefix.size())
|
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");
|
throw session_exception(http::status::unauthorized, "Unauthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
if (!auth_dao_->HasAuthorized(auth_token))
|
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");
|
throw session_exception(http::status::unauthorized, "Unauthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
if (req[http::field::authorization].size() <= auth_prefix.size())
|
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");
|
throw session_exception(http::status::unauthorized, "Unauthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
if (!auth_dao_->HasAuthorized(auth_token))
|
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");
|
throw session_exception(http::status::unauthorized, "Unauthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-3
@@ -14,9 +14,11 @@ void InitLogs()
|
|||||||
logging::keywords::file_name = "app_%Y-%m-%d_%H-%M-%S.log",
|
logging::keywords::file_name = "app_%Y-%m-%d_%H-%M-%S.log",
|
||||||
logging::keywords::rotation_size = 10 * 1024 * 1024,
|
logging::keywords::rotation_size = 10 * 1024 * 1024,
|
||||||
logging::keywords::time_based_rotation =
|
logging::keywords::time_based_rotation =
|
||||||
logging::sinks::file::rotation_at_time_point(0, 0, 0),
|
logging::sinks::file::rotation_at_time_point(0, 0, 0),
|
||||||
logging::keywords::format = "[%TimeStamp%] [%Severity%]: %Message%"
|
logging::keywords::format =
|
||||||
);
|
"[%TimeStamp%] [%Severity%]: %Message%"
|
||||||
|
);
|
||||||
|
|
||||||
logging::add_common_attributes();
|
logging::add_common_attributes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user