mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 20:26:26 +08:00
18 lines
260 B
Go
18 lines
260 B
Go
package alist_v3
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/alist-org/alist/v3/server/common"
|
|
)
|
|
|
|
func checkResp(resp common.Resp[interface{}], err error) error {
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if resp.Code == 200 {
|
|
return nil
|
|
}
|
|
return errors.New(resp.Message)
|
|
}
|