mirror of
https://github.com/vtnerd/monero-lws.git
synced 2025-01-08 19:59:31 +00:00
update access_time and status on login
This commit is contained in:
parent
c37b2deb54
commit
8b40a76e76
1 changed files with 11 additions and 0 deletions
|
@ -701,6 +701,17 @@ namespace lws
|
|||
if (is_hidden(account->first))
|
||||
return {lws::error::account_not_found};
|
||||
|
||||
// Update access time
|
||||
auto update_result = disk.update_access_time(req.creds.address);
|
||||
if (!update_result)
|
||||
return update_result.error();
|
||||
|
||||
// Move account state to active
|
||||
epee::span<const lws::db::account_address> address_span(&req.creds.address, 1);
|
||||
auto change_status_result = disk.change_status(db::account_status::active, address_span);
|
||||
if (!change_status_result)
|
||||
return change_status_result.error();
|
||||
|
||||
// Do not count a request for account creation as login
|
||||
return response{false, bool(account->second.flags & db::account_generated_locally)};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue