Use fetch to get contact_email from config in webpush app migration

This commit is contained in:
Karina Kwiatek 2022-12-26 11:03:18 +00:00
parent 22a84ab818
commit 67423699b6
1 changed files with 1 additions and 1 deletions

View File

@ -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