doemal or other api token added

This commit is contained in:
Yan
2018-04-11 17:20:17 +06:30
parent 53388248e9
commit b730c78afe
8 changed files with 26 additions and 37 deletions

View File

@@ -56,20 +56,20 @@ class MyAesCrypt
return aes_key, aes_iv
end
def checkKeyForAuth(from,token){
def checkKeyForAuth(from,token)
file_path = "config/shops.json"
shop_data = File.read(file_path)
shop_json = JSON.parse(shop_data)
shop_json["data"].each do |j|
if j["lookup"] == from
if(j["value"]["key"] == token){
if(j["value"]["key"] == token)
return true
}
end
end
end
return false
}
end
private
def encrypt(data)