forked from urdt/ussd
Return without setting the flag that's already set
This commit is contained in:
parent
3da2949d38
commit
1a7c992e5b
@ -89,10 +89,9 @@ func (h *Handlers) CreateAccount(ctx context.Context, sym string, input []byte)
|
||||
return res, err
|
||||
}
|
||||
|
||||
// if an account exists, set the flag and return
|
||||
// if an account exists, return to prevent duplicate account creation
|
||||
existingAccountData, err := h.accountFileHandler.ReadAccountData()
|
||||
if existingAccountData != nil {
|
||||
res.FlagSet = append(res.FlagSet, models.USERFLAG_ACCOUNT_CREATED)
|
||||
return res, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user