fix: Remove the notification subscription if present (#5510)
This commit is contained in:
parent
336c09e072
commit
543854eaa8
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class Api::V1::NotificationSubscriptionsController < Api::BaseController
|
|||
|
||||
def destroy
|
||||
notification_subscription = NotificationSubscription.where(["subscription_attributes->>'push_token' = ?", params[:push_token]]).first
|
||||
notification_subscription.destroy!
|
||||
notification_subscription.destroy! if notification_subscription.present?
|
||||
head :ok
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue