not allow to delete account when other transaction is using it

This commit is contained in:
MaysWind
2020-12-14 00:32:26 +08:00
parent 035e7587f1
commit 950941f789
5 changed files with 33 additions and 5 deletions
+1 -1
View File
@@ -329,7 +329,7 @@ func (a *AccountsApi) AccountDeleteHandler(c *core.Context) (interface{}, *errs.
}
uid := c.GetCurrentUid()
err = a.accounts.DeleteAccounts(uid, []int64{accountDeleteReq.Id})
err = a.accounts.DeleteAccount(uid, accountDeleteReq.Id)
if err != nil {
log.ErrorfWithRequestId(c, "[accounts.AccountDeleteHandler] failed to delete account \"id:%d\" for user \"uid:%d\", because %s", accountDeleteReq.Id, uid, err.Error())