about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-05-13 21:45:18 +0200
committerGitHub <noreply@github.com>2018-05-13 21:45:18 +0200
commit416f6445050b662fb15045185332e1dc3bec3694 (patch)
treee7da1ebee51534fb416ea65acd76703325c35997 /app/controllers/api
parent97e43ec5f08aeafe0cb34a2e71e857f22c547f7a (diff)
Fix 404 for GET /api/v1/push/subscription (#7472)
My bad...
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/push/subscriptions_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/api/v1/push/subscriptions_controller.rb b/app/controllers/api/v1/push/subscriptions_controller.rb
index e99f20ca0..1a19bd0ef 100644
--- a/app/controllers/api/v1/push/subscriptions_controller.rb
+++ b/app/controllers/api/v1/push/subscriptions_controller.rb
@@ -21,6 +21,8 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController
   end
 
   def show
+    raise ActiveRecord::RecordNotFound if @web_subscription.nil?
+
     render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer
   end