mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user