mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-15 15:52:13 +11:00
loosened endpoint restrictions
This commit is contained in:
parent
f2da8cdbc2
commit
c970b6a42f
1 changed files with 3 additions and 3 deletions
|
|
@ -121,11 +121,11 @@ BankResponse Bank::GetLogsRange(const std::string &name, size_t start, size_t le
|
||||||
BankResponse res;
|
BankResponse res;
|
||||||
if (start >= MAX_LOG_SIZE)
|
if (start >= MAX_LOG_SIZE)
|
||||||
{
|
{
|
||||||
return {k400BadRequest, "\"Invalid starting index\""};
|
return {k400BadRequest, "\"Invalid {start} index\""};
|
||||||
}
|
}
|
||||||
if (length == 0 || (length + start) > MAX_LOG_SIZE)
|
if (!length)
|
||||||
{
|
{
|
||||||
return {k400BadRequest, "\"Invalid length\""};
|
return {k400BadRequest, "\"Invalid {length}\""};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Bank::users.modify_if(name, [&name, &res, start, length](User &u) { res = {k200OK, u.log.GetLogsRange(start, length)}; }))
|
if (!Bank::users.modify_if(name, [&name, &res, start, length](User &u) { res = {k200OK, u.log.GetLogsRange(start, length)}; }))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue