mirror of
https://github.com/AlistGo/alist.git
synced 2025-12-23 22:10:08 +08:00
fix(189pc): InvalidSessionKey (fix #920)
This commit is contained in:
parent
c276a1541f
commit
6612338fc1
@ -291,6 +291,13 @@ func (s *State) Request(method string, fullUrl string, params Params, callback f
|
|||||||
return nil, fmt.Errorf(erron.Msg)
|
return nil, fmt.Errorf(erron.Msg)
|
||||||
}
|
}
|
||||||
if erron.ErrorCode != "" {
|
if erron.ErrorCode != "" {
|
||||||
|
switch erron.ErrorCode {
|
||||||
|
case "InvalidSessionKey":
|
||||||
|
if err := s.RefreshSession(account); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return s.Request(method, fullUrl, params, callback, account)
|
||||||
|
}
|
||||||
return nil, fmt.Errorf(erron.ErrorMsg)
|
return nil, fmt.Errorf(erron.ErrorMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user