Sha256: 61e153269b043d0d6512df4c5a8fdd91adf8a9a088d4bc6e63a475975772cb63

Contents?: true

Size: 479 Bytes

Versions: 25

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # The controller to handle the subscriptions to push notifications
  class NotificationsSubscriptionsController < Decidim::ApplicationController
    def create
      Decidim::NotificationsSubscriptionsPersistor.new(current_user).add_subscription(params)
      head :ok
    end

    def destroy
      Decidim::NotificationsSubscriptionsPersistor.new(current_user).delete_subscription(params[:auth])
      head :ok
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.4 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.9 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.29.0 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.3 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.8 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.29.0.rc4 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.29.0.rc3 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.29.0.rc2 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.29.0.rc1 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.2 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.7 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.1 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.6 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.0 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.5 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.0.rc5 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.28.0.rc4 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.4 app/controllers/decidim/notifications_subscriptions_controller.rb
decidim-core-0.27.3 app/controllers/decidim/notifications_subscriptions_controller.rb