Skip to content

Instantly share code, notes, and snippets.

@matias-eduardo
Created August 13, 2018 06:32
Show Gist options
  • Save matias-eduardo/9e5bfd3ecafdd2248e109607b3305a56 to your computer and use it in GitHub Desktop.
Save matias-eduardo/9e5bfd3ecafdd2248e109607b3305a56 to your computer and use it in GitHub Desktop.
class EraserController < ApplicationController
include ShopifyApp::WebhookVerification
def customer
params.permit!
# We don't store Shopify customer info.
head :ok
end
def shop
params.permit!
shop = Shop.find_by(shopify_domain: params[:shop_domain])
shop.destroy
head :ok
end
private
def webhook_params
params.except(:controller, :action, :type)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment