From f1a0edd06e38aa807315f34d582904bd9b00acce Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Mon, 22 Jan 2024 23:43:06 +0100 Subject: [PATCH] Replace `webpush` gem in `add_webpush_app` migration --- db/migrate/20220909220449_add_webpush_app.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrate/20220909220449_add_webpush_app.rb b/db/migrate/20220909220449_add_webpush_app.rb index 91b1d32d..f48a688b 100644 --- a/db/migrate/20220909220449_add_webpush_app.rb +++ b/db/migrate/20220909220449_add_webpush_app.rb @@ -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