mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐎 improved getlogs endpoint when max log size is 0
This commit is contained in:
parent
a45dca028c
commit
239573e246
1 changed files with 6 additions and 2 deletions
|
|
@ -171,9 +171,9 @@ public:
|
|||
|
||||
Json::Value GetLogs(const std::string &name, const std::string &attempt)
|
||||
{
|
||||
Json::Value res;
|
||||
if constexpr (max_log_size)
|
||||
{
|
||||
Json::Value res;
|
||||
if (!users.if_contains(name, [&res, &attempt](const User &u) {
|
||||
if (u.password != XXH3_64bits(attempt.data(), attempt.size()))
|
||||
{
|
||||
|
|
@ -187,9 +187,13 @@ public:
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "logs are disabled";
|
||||
}
|
||||
}
|
||||
|
||||
void Save()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue