From 67423699b6b7bc8c48debbecf97bf40b06466da1 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Mon, 26 Dec 2022 11:03:18 +0000 Subject: [PATCH] Use fetch to get contact_email from config in webpush app migration --- db/migrate/20220909220449_add_webpush_app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20220909220449_add_webpush_app.rb b/db/migrate/20220909220449_add_webpush_app.rb index efa8a205..91b1d32d 100644 --- a/db/migrate/20220909220449_add_webpush_app.rb +++ b/db/migrate/20220909220449_add_webpush_app.rb @@ -7,7 +7,7 @@ class AddWebpushApp < ActiveRecord::Migration[6.1] vapid_keypair = Webpush.generate_key.to_hash app = Rpush::Webpush::App.new app.name = "webpush" - app.certificate = vapid_keypair.merge(subject: APP_CONFIG["contact_email"]).to_json + app.certificate = vapid_keypair.merge(subject: APP_CONFIG.fetch("contact_email")).to_json app.connections = 1 app.save! end