namespace email settings keys per adapter
All checks were successful
deploy / deploy (push) Successful in 57s
All checks were successful
deploy / deploy (push) Successful in 57s
Settings keys like api_key were shared across providers, so switching from e.g. Postmark to SendGrid showed the old API key. Now each adapter gets its own namespaced key (email_postmark_api_key, etc.) so credentials persist independently and switching back pre-fills previously saved values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,7 @@ defmodule BerrypodWeb.Admin.EmailSettingsTest do
|
||||
|
||||
test "disconnect clears email configuration", %{conn: conn} do
|
||||
Settings.put_setting("email_adapter", "postmark")
|
||||
Settings.put_secret("email_api_key", "pm_test_abc")
|
||||
Settings.put_secret("email_postmark_api_key", "pm_test_abc")
|
||||
|
||||
{:ok, view, _html} = live(conn, ~p"/admin/settings/email")
|
||||
|
||||
@@ -125,7 +125,7 @@ defmodule BerrypodWeb.Admin.EmailSettingsTest do
|
||||
|
||||
test "shows test email section when configured", %{conn: conn} do
|
||||
Settings.put_setting("email_adapter", "postmark")
|
||||
Settings.put_secret("email_api_key", "pm_test_abc")
|
||||
Settings.put_secret("email_postmark_api_key", "pm_test_abc")
|
||||
|
||||
{:ok, _view, html} = live(conn, ~p"/admin/settings/email")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user