mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-19 01:22:14 +11:00
🐛 toResponse is also impacted by filter thread_local bug
This commit is contained in:
parent
18452fdf1e
commit
1d826fe96e
1 changed files with 2 additions and 2 deletions
|
|
@ -7,9 +7,9 @@ BankResponse::BankResponse(drogon::HttpStatusCode code, const std::string &str)
|
||||||
template <>
|
template <>
|
||||||
drogon::HttpResponsePtr drogon::toResponse(BankResponse &&data)
|
drogon::HttpResponsePtr drogon::toResponse(BankResponse &&data)
|
||||||
{
|
{
|
||||||
static thread_local auto res = std::make_shared<HttpResponseImpl>(data.first, CT_APPLICATION_JSON);
|
auto res = std::make_shared<HttpResponseImpl>(data.first, CT_APPLICATION_JSON);
|
||||||
res->setBody(std::move(data.second));
|
res->setBody(std::move(data.second));
|
||||||
static thread_local auto &advices = HttpAppFrameworkImpl::instance().getResponseCreationAdvices();
|
const auto &advices = HttpAppFrameworkImpl::instance().getResponseCreationAdvices();
|
||||||
if (!advices.empty())
|
if (!advices.empty())
|
||||||
{
|
{
|
||||||
for (auto &advice : advices)
|
for (auto &advice : advices)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue