diff --git a/server/utils/captcha/redis.go b/server/utils/captcha/redis.go index a13b7cc1..ffb4dbf7 100644 --- a/server/utils/captcha/redis.go +++ b/server/utils/captcha/redis.go @@ -5,7 +5,6 @@ import ( "time" "github.com/flipped-aurora/gin-vue-admin/server/global" - "github.com/mojocn/base64Captcha" "go.uber.org/zap" ) @@ -23,8 +22,10 @@ type RedisStore struct { Context context.Context } -func (rs *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store { - rs.Context = ctx +func (rs *RedisStore) UseWithCtx(ctx context.Context) *RedisStore { + if ctx == nil { + rs.Context = ctx + } return rs }