mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
🐛 finally fixed Log bug
This commit is contained in:
parent
060c4211a5
commit
9ec6a5de56
1 changed files with 9 additions and 6 deletions
|
|
@ -159,9 +159,15 @@ public:
|
||||||
|
|
||||||
Json::Value GetLogs(const std::string &name, const std::string &attempt)
|
Json::Value GetLogs(const std::string &name, const std::string &attempt)
|
||||||
{
|
{
|
||||||
Json::Value res = -1;
|
Json::Value res;
|
||||||
users.if_contains(name, [&res, &attempt](const User &u) {
|
users.if_contains(name, [&res, &attempt](const User &u) {
|
||||||
if (u.log.data.size() && u.password == XXH3_64bits(attempt.data(), attempt.size()))
|
if (u.password != XXH3_64bits(attempt.data(), attempt.size()))
|
||||||
|
{
|
||||||
|
res = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (u.log.data.size())
|
||||||
{
|
{
|
||||||
uint32_t j;
|
uint32_t j;
|
||||||
for (uint32_t i = u.log.data.size() - 1; i > 0; --i)
|
for (uint32_t i = u.log.data.size() - 1; i > 0; --i)
|
||||||
|
|
@ -177,10 +183,7 @@ public:
|
||||||
res[j]["time"] = (Json::UInt64)u.log.data[i].time;
|
res[j]["time"] = (Json::UInt64)u.log.data[i].time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
res = -1;
|
||||||
{
|
|
||||||
res = 0;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue