From ff67dbed2b2878ba0d8032bdde08e06bc0eead3e Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 11 Jan 2020 02:41:35 -0600 Subject: pass monsterfork api exposure setting to all serializers + add `MONSTERFORK_API_FORCE_*` env vars to set api compatability modes for clients/apps --- app/controllers/api/v1/push/subscriptions_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/controllers/api/v1/push') 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 -- cgit