mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 08:29:53 +01:00
Replace webpush
gem in add_webpush_app
migration
This commit is contained in:
parent
6c2314de2d
commit
f1a0edd06e
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue