mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 14:30:26 +00:00
fix: fix crash when Redis is enabled
This commit is contained in:
@@ -33,6 +33,7 @@ func CacheGetTokenByKey(key string) (*Token, error) {
|
||||
if err != nil {
|
||||
common.SysError("Redis set token error: " + err.Error())
|
||||
}
|
||||
return &token, nil
|
||||
}
|
||||
err = json.Unmarshal([]byte(tokenObjectString), &token)
|
||||
return &token, err
|
||||
@@ -94,6 +95,7 @@ func CacheGetRandomSatisfiedChannel(group string, model string) (*Channel, error
|
||||
if !common.RedisEnabled {
|
||||
return GetRandomSatisfiedChannel(group, model)
|
||||
}
|
||||
return GetRandomSatisfiedChannel(group, model)
|
||||
// TODO: implement this
|
||||
return nil, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user