simplify delete account when change name

This commit is contained in:
微凉
2021-11-17 15:25:31 +08:00
parent e8d27a30b4
commit e4d254e4b0
5 changed files with 3 additions and 10 deletions

View File

@ -36,9 +36,6 @@ func (n Native) Proxy(c *gin.Context) {
}
func (n Native) Save(account *model.Account, old *model.Account) error {
if old != nil {
model.DeleteAccountFromMap(old.Name)
}
log.Debugf("save a account: [%s]", account.Name)
if !utils.Exists(account.RootFolder) {
account.Status = fmt.Sprintf("[%s] not exist", account.RootFolder)