Commit 27d33d23 by JustSong

fix: fix crash when Redis is enabled

parent a6cc0226
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment