mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🔥 removed thread_local for cached responses
This commit is contained in:
parent
24053efeb8
commit
9a67d223dc
1 changed files with 7 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ static thread_local ondemand::parser parser;
|
|||
callback(resp)
|
||||
|
||||
#define RESPOND_TRUE \
|
||||
static thread_local auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k204NoContent, std::nullopt}); \
|
||||
auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k204NoContent, std::nullopt}); \
|
||||
CORS; \
|
||||
CACHE_FOREVER; \
|
||||
callback(resp)
|
||||
|
|
@ -34,7 +34,7 @@ void api::GetLogs(req_args)
|
|||
#if MAX_LOG_SIZE > 0
|
||||
RESPONSE_PARSE(Bank::GetLogs(NAME_PARAM));
|
||||
#else
|
||||
static thread_local auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k404NotFound, "\"Logs are Disabled\""});
|
||||
auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k404NotFound, "\"Logs are Disabled\""});
|
||||
CORS;
|
||||
CACHE_FOREVER;
|
||||
callback(resp);
|
||||
|
|
@ -176,7 +176,7 @@ void api::ImpactBal(req_args)
|
|||
//System Usage
|
||||
void api::Help(req_args)
|
||||
{
|
||||
static thread_local auto resp = HttpResponse::newRedirectionResponse("https://github.com/EntireTwix/CCash/blob/README.md", k301MovedPermanently);
|
||||
auto resp = HttpResponse::newRedirectionResponse("https://github.com/EntireTwix/CCash/blob/README.md", k301MovedPermanently);
|
||||
CACHE_FOREVER;
|
||||
callback(resp);
|
||||
}
|
||||
|
|
@ -214,7 +214,7 @@ void api::ApiProperties(req_args)
|
|||
{
|
||||
info += "}";
|
||||
}
|
||||
static thread_local auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k200OK, std::move(info)});
|
||||
auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k200OK, std::move(info)});
|
||||
CORS;
|
||||
CACHE_FOREVER;
|
||||
callback(resp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue