fanforce-app-factory 0.37.0 → 0.37.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,11 @@ class FanforceApp::Sinatra
|
|
29
29
|
raise 'This is not a valid app uninstall request.' if !ff.valid_uninstall_request?(params)
|
30
30
|
api_key = $Redis.get("installed:#{ff.params[:addon_type]}-#{ff.params[:addon_id]}:#{params[:organization_id]}")
|
31
31
|
|
32
|
-
|
32
|
+
if api_key.present? and api_key != params[:api_key]
|
33
|
+
is_valid_key = Fanforce::API.new.get("/api_auths/is_valid_key/#{params[:api_key]}", organization_id: params[:organization_id], app_id: params[:app_id])[:result]
|
34
|
+
raise 'API keys must match before an addon can be uninstalled.' if !is_valid_key
|
35
|
+
end
|
36
|
+
|
33
37
|
$Redis.del("installed:#{ff.params[:addon_type]}-#{ff.params[:addon_id]}:#{params[:organization_id]}")
|
34
38
|
json status: 'finished-processing'
|
35
39
|
end
|