Skip to content

Commit

Permalink
Merge pull request #1508 from zdreamx/main-2
Browse files Browse the repository at this point in the history
bugfix: fixed redis.go Set function
  • Loading branch information
SliverHorn committed Aug 10, 2023
2 parents 73d6cb7 + 989e84b commit 0275439
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/utils/captcha/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ func (rs *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store {
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()
if err != nil {
global.GVA_LOG.Error("RedisStoreSetError!", zap.Error(err))
return err
}
return nil
}

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

0 comments on commit 0275439

Please sign in to comment.