Skip to content

Commit 639b930

Browse files
authored
Merge pull request #1508 from zdreamx/main-2
bugfix: fixed redis.go Set function
2 parents dbfeb4b + 607235e commit 639b930

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/utils/captcha/redis.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ func (rs *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store {
2727
return rs
2828
}
2929

30-
func (rs *RedisStore) Set(id string, value string) {
30+
func (rs *RedisStore) Set(id string, value string) error {
3131
err := global.GVA_REDIS.Set(rs.Context, rs.PreKey+id, value, rs.Expiration).Err()
3232
if err != nil {
33-
global.GVA_LOG.Error("RedisStoreSetError!", zap.Error(err))
33+
return err
3434
}
35+
return nil
3536
}
3637

3738
func (rs *RedisStore) Get(key string, clear bool) string {

0 commit comments

Comments
 (0)