Module: Fera::Apps::Controllers::Hooks

Extended by:
ActiveSupport::Concern
Defined in:
lib/fera/apps/concerns/controllers/hooks.rb

Instance Method Summary collapse

Instance Method Details

#app_uninstallObject

POST /fera/hooks/app_uninstall All apps should have an uninstall hook to cleanup data if app is uninstalled from Fera’s side



18
19
20
21
22
23
24
# File 'lib/fera/apps/concerns/controllers/hooks.rb', line 18

def app_uninstall
  @store.destroy!

  ::Rails.logger.info("Deleted store #{ @store.id } triggered by Fera uninstall webhook.")

  head :ok
end