mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 08:29:53 +01:00
Don't require an endpoint for unsubscribe
This was added by mistake earlier. Unsubscribing without an `endpoint` parameter is supposed to remove all subscriptions.
This commit is contained in:
parent
8770224eff
commit
ab338d64a8
1 changed files with 0 additions and 2 deletions
|
@ -42,8 +42,6 @@ class Ajax::WebPushController < AjaxController
|
|||
end
|
||||
|
||||
def unsubscribe # rubocop:disable Metrics/AbcSize
|
||||
params.require(:endpoint)
|
||||
|
||||
removed = if params.key?(:endpoint)
|
||||
current_user.web_push_subscriptions.where("subscription ->> 'endpoint' = ?", params[:endpoint]).destroy_all
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue