Fix add validation to webpush subscription keys (#30542)
This commit is contained in:
parent
5f15a892fa
commit
4655be0da6
4 changed files with 57 additions and 11 deletions
|
@ -25,6 +25,8 @@ class Web::PushSubscription < ApplicationRecord
|
|||
validates :key_p256dh, presence: true
|
||||
validates :key_auth, presence: true
|
||||
|
||||
validates_with WebPushKeyValidator
|
||||
|
||||
delegate :locale, to: :associated_user
|
||||
|
||||
def encrypt(payload)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue