request key

This commit is contained in:
Yan
2018-01-12 18:11:52 +06:30
parent 999a46f41d
commit ad4be54ef2
4 changed files with 9 additions and 9 deletions

View File

@@ -233,13 +233,13 @@ class License
def get_key
api_token = read_license_no_decrypt("api_token")
shop_name = read_license_no_decrypt("shop_name")
@params = { query: {lookup_type: "application", api_token: api_token} }
@params = { query: {lookup_type: "application", api_token: api_token } }
response = self.class.get("/get_key", @params)
@data = response.parsed_response
if (@data["status"])
##Check from local redis - if available load local otherwise get from remote
cache_key = "shop:#{shop_name}"
cache_key = "shop:#{shop_name.chomp}"
cache_license = nil