🐎 response is always true or false so to_string is slower

This commit is contained in:
EntireTwix 2021-07-07 16:30:28 -07:00
parent 9ee4f7ab88
commit 51a9ab8ff8

View file

@ -92,7 +92,9 @@ void api::Close(req_args) const
}
void api::Contains(req_args, const std::string &name) const
{
RESPONSE_PARSE(BankResponse(k200OK, std::to_string(bank.Contains(name))));
const auto resp = HttpResponse::newCustomHttpResponse(bank.Contains(name) ? "true" : "false");
CORS;
callback(resp);
}
void api::AdminVerifyAccount(req_args) const
{