mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Only allow checking of own subscriptions
This commit is contained in:
parent
2417354b31
commit
48c7beb54e
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class Ajax::WebPushController < AjaxController
|
|||
def check
|
||||
params.permit(:endpoint)
|
||||
|
||||
found = WebPushSubscription.where("subscription ->> 'endpoint' = ?", params[:endpoint]).first
|
||||
found = current_user.web_push_subscriptions.where("subscription ->> 'endpoint' = ?", params[:endpoint]).first
|
||||
|
||||
@response[:status] = if found
|
||||
if found.failures >= 3
|
||||
|
|
Loading…
Reference in a new issue