mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 08:12:12 +11:00
🐛 correction to last commit
This commit is contained in:
parent
1b2c763f0b
commit
78b62092b3
1 changed files with 3 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "bank_api.h"
|
||||
|
||||
// TODO: parser iterate(input).get(doc) error handling might be superfulous
|
||||
|
||||
#define CACHE_FOREVER resp->setExpiredTime(0)
|
||||
|
||||
#define CORS resp->addHeader("Access-Control-Allow-Origin", "*")
|
||||
|
|
@ -301,7 +303,7 @@ void api::AdminAddUser(req_args)
|
|||
std::string_view name;
|
||||
uint64_t amount;
|
||||
std::string_view pass;
|
||||
if (doc["name"].get(name) || doc["amount"].get(amount) || doc["time"].get(pass))
|
||||
if (doc["name"].get(name) || doc["amount"].get(amount) || doc["time"].get(pass) || (amount > std::numeric_limits<uint32_t>::max()))
|
||||
{
|
||||
res = BankResponse{k400BadRequest, "\"Missing/Invalid JSON arg(s)\""};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue