diff --git a/app/controllers/webhooks/facebook_controller.rb b/app/controllers/facebook/delete_controller.rb similarity index 94% rename from app/controllers/webhooks/facebook_controller.rb rename to app/controllers/facebook/delete_controller.rb index 17456f291..2570d1ea0 100644 --- a/app/controllers/webhooks/facebook_controller.rb +++ b/app/controllers/facebook/delete_controller.rb @@ -1,7 +1,7 @@ -class Webhooks::FacebookController < ActionController::API +class Facebook::DeleteController < ApplicationController class InvalidDigestError < StandardError; end - def process_deletion + def create signed_request = params['signed_request'] payload = parse_fb_signed_request(signed_request) id_to_process = payload['user_id'] diff --git a/config/routes.rb b/config/routes.rb index 6307ade0b..422ea8fff 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -454,6 +454,11 @@ Rails.application.routes.draw do resource :callback, only: [:show] end + namespace :facebook do + resource :delete, only: [:create] + resource :confirm, only: [:show] + end + namespace :linear do resource :callback, only: [:show] end