about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-09 14:48:43 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-09 14:48:59 +0200
commit22a8801dbc77d2d01b326a7cb89d1a28b054e073 (patch)
tree11a3a99e98df33cbb73da818419fa0227b1dc664 /app/controllers/api
parent52d7f862d365acfd4eacbe448238699d9662708d (diff)
Adding domain blocks
Diffstat (limited to 'app/controllers/api')
-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