Module: Insales::Controller::InstallerActions

Defined in:
lib/insales/controller/installer_actions.rb

Instance Method Summary collapse

Instance Method Details

#installObject



3
4
5
6
7
8
9
# File 'lib/insales/controller/installer_actions.rb', line 3

def install
  if insales_app_class.install(params[:shop], params[:token], params[:insales_id])
    head :ok
  else
    raise 'Instalation failed'
  end
end

#uninstallObject



11
12
13
14
15
16
17
# File 'lib/insales/controller/installer_actions.rb', line 11

def uninstall
  if insales_app_class.uninstall(params[:shop], params[:token])
    head :ok
  else
    raise 'Uninstallation failed'
  end
end