Replace `webpush` gem in `add_webpush_app` migration
This commit is contained in:
parent
6c2314de2d
commit
f1a0edd06e
|
@ -1,10 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "webpush"
|
||||
require "web-push"
|
||||
|
||||
class AddWebpushApp < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
vapid_keypair = Webpush.generate_key.to_hash
|
||||
vapid_keypair = WebPush.generate_key.to_hash
|
||||
app = Rpush::Webpush::App.new
|
||||
app.name = "webpush"
|
||||
app.certificate = vapid_keypair.merge(subject: APP_CONFIG.fetch("contact_email")).to_json
|
||||
|
|
Loading…
Reference in New Issue