diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-08-17 17:56:23 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-08-17 17:58:00 +0200 |
commit | 10ba09f5466fe3d34a5ed78202c35f4e4f9d30e6 (patch) | |
tree | ed1a2f603198053a6872d3ac74ee69ba4990fdf3 /app/controllers/api | |
parent | ff2cbc07530d87132af09900b4d0c9ada9d3e716 (diff) |
Upgrade to Rails 5.0.0.1
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/salmon_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/subscriptions_controller.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/api/salmon_controller.rb b/app/controllers/api/salmon_controller.rb index b15aefee9..329b258a4 100644 --- a/app/controllers/api/salmon_controller.rb +++ b/app/controllers/api/salmon_controller.rb @@ -4,7 +4,7 @@ class Api::SalmonController < ApiController def update ProcessInteractionService.new.(request.body.read, @account) - render nothing: true, status: 201 + head 201 end private diff --git a/app/controllers/api/subscriptions_controller.rb b/app/controllers/api/subscriptions_controller.rb index 91b987ce4..e923b9b66 100644 --- a/app/controllers/api/subscriptions_controller.rb +++ b/app/controllers/api/subscriptions_controller.rb @@ -4,9 +4,9 @@ class Api::SubscriptionsController < ApiController def show if @account.subscription(api_subscription_url(@account.id)).valid?(params['hub.topic'], params['hub.verify_token']) - render text: HTMLEntities.new.encode(params['hub.challenge']), status: 200 + render plain: HTMLEntities.new.encode(params['hub.challenge']), status: 200 else - render nothing: true, status: 404 + head 404 end end @@ -15,9 +15,9 @@ class Api::SubscriptionsController < ApiController if @account.subscription(api_subscription_url(@account.id)).verify(body, request.headers['HTTP_X_HUB_SIGNATURE']) ProcessFeedService.new.(body, @account) - render nothing: true, status: 201 + head 201 else - render nothing: true, status: 202 + head 202 end end |