🐛 fix pikpak and shandian account status

This commit is contained in:
微凉
2021-12-30 17:59:35 +08:00
parent 3331462229
commit 5f2621eca9
2 changed files with 15 additions and 8 deletions

View File

@ -34,11 +34,14 @@ func (driver Shandian) Login(account *model.Account) error {
return err
}
if resp.Code != 0 {
return errors.New(resp.Msg)
account.Status = resp.Msg
err = errors.New(resp.Msg)
} else {
account.Status = "work"
account.AccessToken = resp.Data.Token
}
account.AccessToken = resp.Data.Token
_ = model.SaveAccount(account)
return nil
return err
}
type File struct {