about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/subscriptions_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/api/subscriptions_controller.rb b/app/controllers/api/subscriptions_controller.rb
index c5190b136..c3aeee94d 100644
--- a/app/controllers/api/subscriptions_controller.rb
+++ b/app/controllers/api/subscriptions_controller.rb
@@ -13,8 +13,9 @@ class Api::SubscriptionsController < ApiController
 
   def update
     body = request.body.read
+    subscription = @account.subscription(api_subscription_url(@account.id))
 
-    if @account.subscription(api_subscription_url(@account.id)).verify(body, request.headers['HTTP_X_HUB_SIGNATURE'])
+    if subscription.verify(body, request.headers['HTTP_X_HUB_SIGNATURE'])
       ProcessFeedService.new.call(body, @account)
       head 201
     else