🔥🐎 removed jsoncpp from API properties

This commit is contained in:
William Katz 2021-07-12 15:45:37 -07:00 committed by GitHub
parent f0c8920da1
commit 7be15963d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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