about summary refs log tree commit diff
path: root/app/controllers/api/v1/push
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-11 02:41:35 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-11 02:41:35 -0600
commitff67dbed2b2878ba0d8032bdde08e06bc0eead3e (patch)
tree805919a162596e67dc8803f9db7892eefc289ea4 /app/controllers/api/v1/push
parentd9a9a18afae94ec0a2160e746265e47d7b639eaf (diff)
pass monsterfork api exposure setting to all serializers + add `MONSTERFORK_API_FORCE_*` env vars to set api compatability modes for clients/apps
Diffstat (limited to 'app/controllers/api/v1/push')
-rw-r--r--app/controllers/api/v1/push/subscriptions_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api/v1/push/subscriptions_controller.rb b/app/controllers/api/v1/push/subscriptions_controller.rb
index 1b658f870..f49611c0e 100644
--- a/app/controllers/api/v1/push/subscriptions_controller.rb
+++ b/app/controllers/api/v1/push/subscriptions_controller.rb
@@ -17,13 +17,13 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController
       access_token_id: doorkeeper_token.id
     )
 
-    render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer
+    render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer, monsterfork_api: monsterfork_api
   end
 
   def show
     raise ActiveRecord::RecordNotFound if @web_subscription.nil?
 
-    render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer
+    render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer, monsterfork_api: monsterfork_api
   end
 
   def update
@@ -31,7 +31,7 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController
 
     @web_subscription.update!(data: data_params)
 
-    render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer
+    render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer, monsterfork_api: monsterfork_api
   end
 
   def destroy