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
- raise 'API keys must match before an addon can be uninstalled.' if api_key.present? and params[:api_key] != api_key
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
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module AppFactory
3
- VERSION = '0.37.0'
3
+ VERSION = '0.37.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-app-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.37.0
4
+ version: 0.37.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: