]> cat aescling's git repositories - mastodon.git/commitdiff
Fix 404 for GET /api/v1/push/subscription (#7472)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 13 May 2018 19:45:18 +0000 (21:45 +0200)
committerGitHub <noreply@github.com>
Sun, 13 May 2018 19:45:18 +0000 (21:45 +0200)
My bad...

app/controllers/api/v1/push/subscriptions_controller.rb

index e99f20ca05fa71004accc8a8c0d49fdd869f9c37..1a19bd0ef6e9fd0c7c12481da0cdd8ef8faf310a 100644 (file)
@@ -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