🐛 fix 189 account status

pull/548/head
微凉 2021-11-16 15:08:55 +08:00
parent 07155cfd01
commit f87ee1ed9e
1 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,13 @@ func (c Cloud189) Save(account *model.Account, old *model.Account) error {
delete(client189Map, old.Name)
}
if err := c.Login(account); err != nil {
account.Status = err.Error()
_ = model.SaveAccount(account)
return err
}
account.Status = "work"
err := model.SaveAccount(account)
if err != nil {
return err
}
return nil