diff options
-rw-r--r-- | app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb b/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb index 79d1f5f..1472f4d 100644 --- a/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb +++ b/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb @@ -1,6 +1,8 @@ class SolidusSubscriptions::Api::V1::SubscriptionsController < Spree::Api::BaseController before_action :load_subscription, only: [:cancel, :update, :skip] + protect_from_forgery unless: -> { request.format.json? } + def update if @subscription.update(subscription_params) render json: @subscription.to_json(include: [:line_items, :shipping_address]) |