Commit 6572554c by lanrion

hot fix for without redis config

parent daf34aa0
......@@ -27,7 +27,7 @@ module WeixinAuthorize
end
def weixin_redis
WeixinAuthorize.config.redis
WeixinAuthorize.weixin_redis
end
end
......
......@@ -10,7 +10,7 @@ module WeixinAuthorize
end
def self.init_with(client)
if WeixinAuthorize.config.redis.nil?
if WeixinAuthorize.weixin_redis.nil?
ClientStorage.new(client)
else
RedisStorage.new(client)
......
......@@ -7,6 +7,11 @@ module WeixinAuthorize
def configure
yield self.config ||= Config.new
end
def weixin_redis
return nil if WeixinAuthorize.config.nil?
@redis ||= WeixinAuthorize.config.redis
end
end
class Config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment