mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐛 fixed return on delete functionality
This commit is contained in:
parent
3b1a459e18
commit
541b912efe
1 changed files with 5 additions and 5 deletions
10
src/bank.cpp
10
src/bank.cpp
|
|
@ -209,11 +209,7 @@ int_fast8_t Bank::DelUser(const std::string &name, const std::string &attempt) n
|
|||
{
|
||||
if constexpr (RETURN_ON_DEL)
|
||||
{
|
||||
return (state) ? true : ErrorResponse::WrongPassword;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state)
|
||||
if (state) //if the password matches
|
||||
{
|
||||
#if RETURN_ON_DEL
|
||||
users.modify_if(return_account, [&bal](User &u) {
|
||||
|
|
@ -227,6 +223,10 @@ int_fast8_t Bank::DelUser(const std::string &name, const std::string &attempt) n
|
|||
return ErrorResponse::WrongPassword;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return (state) ? true : ErrorResponse::WrongPassword;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue