From cbd6ba0559225d7be0cbfeae8fbc011a159a8419 Mon Sep 17 00:00:00 2001 From: syed-ali-tw Date: Mon, 2 Dec 2024 11:23:00 +0000 Subject: [PATCH] Add notify key --- config/application.rb | 2 +- config/secrets.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 0874b680e..64d79e477 100644 --- a/config/application.rb +++ b/config/application.rb @@ -63,7 +63,7 @@ class Application < Rails::Application config.asset_host = ENV.fetch("ASSET_HOST", nil) config.action_mailer.notify_settings = { - api_key: Rails.application.credentials.notify_api_key || "fake-test-api-key", + api_key: ENV["GOVUK_NOTIFY_API_KEY"] || "fake-test-api-key", } config.generators do |g| diff --git a/config/secrets.yml b/config/secrets.yml index 03c910594..23984edc7 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -13,10 +13,12 @@ development: secret_key_base: p647607dffea898a0f668fea448896db7ca3a0527f9e926db3ae629617cd64e16d2b4d357dcb312ed3f4ae5daaad98c589bb0ef1da4c251c0234b457d2e4a49f link_checker_api_secret_token: stk3ffv3DvpKfHmsU4pbxsxc + notify_api_key: <%= ENV["GOVUK_NOTIFY_API_KEY"] %> test: secret_key_base: 073ab37a8631ad8caf644cb52662e222b95cac9a0ed4b8523f86819e50c544dfc49c12aa58090604b490235424fa77d66c10b016ecc706acf83193d2c6090318 link_checker_api_secret_token: stk3ffv3DvpKfHmsU4pbxsxc + notify_api_key: <%= ENV["GOVUK_NOTIFY_API_KEY"] %> # Do not keep production secrets in the repository, # instead read values from the environment.