🐛 fix add account

This commit is contained in:
微凉
2021-11-13 19:31:35 +08:00
parent 48a65784c7
commit b785945210
5 changed files with 19 additions and 16 deletions

View File

@ -282,13 +282,13 @@ func (o Onedrive) Save(account *model.Account, old *model.Account) error {
return
}
err = o.RefreshToken(&newAccount)
_ = model.SaveAccount(newAccount)
_ = model.SaveAccount(&newAccount)
})
if err != nil {
return err
}
account.CronId = int(cronId)
err = model.SaveAccount(*account)
err = model.SaveAccount(account)
if err != nil {
return err
}
@ -296,7 +296,7 @@ func (o Onedrive) Save(account *model.Account, old *model.Account) error {
}
func (o Onedrive) Proxy(c *gin.Context) {
c.Request.Header.Del("Origin")
}
func (o Onedrive) Preview(path string, account *model.Account) (interface{}, error) {