From 114596db19fe46fbbbc9511c0ff63c5a5731aac6 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 3 Mar 2025 17:43:10 +0530 Subject: [PATCH] feat: move controller to facebook --- .../facebook_controller.rb => facebook/delete_controller.rb} | 4 ++-- config/routes.rb | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) rename app/controllers/{webhooks/facebook_controller.rb => facebook/delete_controller.rb} (94%) 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