bugfix: fixed redis.go Set function
This commit is contained in:
parent
dbfeb4b0fa
commit
607235eb01
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue