Class: Decidim::NotificationsSubscriptionsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::NotificationsSubscriptionsController
- Defined in:
- decidim-core/app/controllers/decidim/notifications_subscriptions_controller.rb
Overview
The controller to handle the subscriptions to push notifications
Instance Method Summary collapse
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from Headers::HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
6 7 8 9 |
# File 'decidim-core/app/controllers/decidim/notifications_subscriptions_controller.rb', line 6 def create Decidim::NotificationsSubscriptionsPersistor.new(current_user).add_subscription(params) head :ok end |
#destroy ⇒ Object
11 12 13 14 |
# File 'decidim-core/app/controllers/decidim/notifications_subscriptions_controller.rb', line 11 def destroy Decidim::NotificationsSubscriptionsPersistor.new(current_user).delete_subscription(params[:auth]) head :ok end |