未验证 提交 02754393 编写于 作者: Sliver_Horn's avatar Sliver_Horn 提交者: GitHub

Merge pull request #1508 from zdreamx/main-2

bugfix: fixed redis.go Set function
...@@ -27,11 +27,12 @@ func (rs *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store { ...@@ -27,11 +27,12 @@ func (rs *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store {
return rs return rs
} }
func (rs *RedisStore) Set(id string, value string) { func (rs *RedisStore) Set(id string, value string) error {
err := global.GVA_REDIS.Set(rs.Context, rs.PreKey+id, value, rs.Expiration).Err() err := global.GVA_REDIS.Set(rs.Context, rs.PreKey+id, value, rs.Expiration).Err()
if err != nil { if err != nil {
global.GVA_LOG.Error("RedisStoreSetError!", zap.Error(err)) return err
} }
return nil
} }
func (rs *RedisStore) Get(key string, clear bool) string { func (rs *RedisStore) Get(key string, clear bool) string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册