mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-22 12:58:45 +08:00
fix(139): incorrect refreshTokenResp serialization (#6248)
This commit is contained in:
parent
88947f6676
commit
022e0ca292
@ -64,7 +64,7 @@ func (d *Yun139) refreshToken() error {
|
||||
splits := strings.Split(decodeStr, ":")
|
||||
reqBody := "<root><token>" + splits[2] + "</token><account>" + splits[1] + "</account><clienttype>656</clienttype></root>"
|
||||
_, err = base.RestyClient.R().
|
||||
//ForceContentType("application/json").
|
||||
ForceContentType("application/xml").
|
||||
SetBody(reqBody).
|
||||
SetResult(&resp).
|
||||
Post(url)
|
||||
@ -74,7 +74,7 @@ func (d *Yun139) refreshToken() error {
|
||||
if resp.Return != "0" {
|
||||
return fmt.Errorf("failed to refresh token: %s", resp.Desc)
|
||||
}
|
||||
d.Authorization = base64.StdEncoding.EncodeToString([]byte(splits[0] + splits[1] + ":" + resp.Token))
|
||||
d.Authorization = base64.StdEncoding.EncodeToString([]byte(splits[0] + ":" + splits[1] + ":" + resp.Token))
|
||||
op.MustSaveDriverStorage(d)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user