mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🔥🐎 removed jsoncpp from API properties
This commit is contained in:
parent
f0c8920da1
commit
7be15963d0
1 changed files with 8 additions and 11 deletions
|
|
@ -165,19 +165,16 @@ void api::AdminVerifyAccount(req_args) const
|
|||
}
|
||||
void api::ApiProperties(req_args) const
|
||||
{
|
||||
//yet to be converted to simdjson
|
||||
Json::Value temp;
|
||||
temp["version"] = API_VERSION;
|
||||
temp["max_log"] = MAX_LOG_SIZE;
|
||||
temp["min_name"] = min_name_size;
|
||||
temp["max_name"] = max_name_size;
|
||||
temp["return_on_del"] = RETURN_ON_DEL;
|
||||
std::string info = "{\"version\":" + std::to_string(API_VERSION) + ",\"max_log\":" + std::to_string(MAX_LOG_SIZE) + ",\"return_on_del\":" + std::to_string(RETURN_ON_DEL);
|
||||
if constexpr (RETURN_ON_DEL)
|
||||
{
|
||||
temp["return_on_del_acc"] = return_account;
|
||||
info += ",\"" + std::string(return_account) + "\"}";
|
||||
}
|
||||
|
||||
static thread_local auto resp = HttpResponse::newHttpJsonResponse(std::move(temp));
|
||||
else
|
||||
{
|
||||
info += "}";
|
||||
}
|
||||
static thread_local auto resp = HttpResponse::newCustomHttpResponse(BankResponse{k200OK, std::move(info)});
|
||||
CORS;
|
||||
CACHE_FOREVER;
|
||||
callback(resp);
|
||||
|
|
@ -239,4 +236,4 @@ void api::AdminDelUser(req_args) const
|
|||
}
|
||||
RESPONSE_PARSE(std::move(res));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue