mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-18 17:12: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)
|
if constexpr (RETURN_ON_DEL)
|
||||||
{
|
{
|
||||||
return (state) ? true : ErrorResponse::WrongPassword;
|
if (state) //if the password matches
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (state)
|
|
||||||
{
|
{
|
||||||
#if RETURN_ON_DEL
|
#if RETURN_ON_DEL
|
||||||
users.modify_if(return_account, [&bal](User &u) {
|
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;
|
return ErrorResponse::WrongPassword;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (state) ? true : ErrorResponse::WrongPassword;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue