mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 12:37:08 +11:00
🐛 logs being disabled wasnt building
This commit is contained in:
parent
4ca1bbe6eb
commit
d63be0ec73
2 changed files with 4 additions and 3 deletions
|
|
@ -86,6 +86,7 @@ BankResponse Bank::GetBal(const std::string &name) noexcept
|
|||
}
|
||||
}
|
||||
#if MAX_LOG_SIZE > 0
|
||||
|
||||
#if MIN_API_SUPPORT == 1
|
||||
BankResponse Bank::GetLogs(const std::string &name) noexcept
|
||||
{
|
||||
|
|
@ -115,6 +116,7 @@ BankResponse Bank::GetLogsV2(const std::string &name) noexcept
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
BankResponse Bank::SendFunds(const std::string &a_name, const std::string &b_name, uint32_t amount) noexcept
|
||||
|
|
@ -231,7 +233,7 @@ BankResponse Bank::PruneUsers(uint32_t threshold_bal) noexcept
|
|||
for (const auto &u : users)
|
||||
{
|
||||
#if RETURN_ON_DEL
|
||||
if (Bank::users.erase_if(u.first, [threshold_time, threshold_bal, &bal, &deleted_count](User &u) {
|
||||
if (Bank::users.erase_if(u.first, [threshold_bal, &bal, &deleted_count](User &u) {
|
||||
bal += u.balance;
|
||||
#else
|
||||
if (Bank::users.erase_if(u.first, [threshold_time, threshold_bal, &deleted_count](User &u) {
|
||||
|
|
|
|||
|
|
@ -244,9 +244,9 @@ void api::PruneUsers(req_args)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint64_t amount;
|
||||
#if MAX_LOG_SIZE > 0
|
||||
int64_t time;
|
||||
uint64_t amount;
|
||||
if (doc["time"].get(time) || doc["amount"].get(amount) || (amount > std::numeric_limits<uint32_t>::max()))
|
||||
{
|
||||
res = BankResponse{k400BadRequest, "\"Missing/Invalid JSON arg(s)\""};
|
||||
|
|
@ -256,7 +256,6 @@ void api::PruneUsers(req_args)
|
|||
res = Bank::PruneUsers(time, amount);
|
||||
}
|
||||
#else
|
||||
uint64_t amount
|
||||
if (doc["amount"].get(amount) || (amount > std::numeric_limits<uint32_t>::max()))
|
||||
{
|
||||
res = BankResponse{k400BadRequest, "\"Missing/Invalid JSON arg(s)\""};
|
||||
|
|
|
|||
Loading…
Reference in a new issue