mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Move NoopAdapter to Domain app (#1756)
Workaround for this: https://github.com/elixir-lang/elixir/issues/12777
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
defmodule Web.Mailer.NoopAdapter do
|
||||
defmodule Domain.Mailer.NoopAdapter do
|
||||
@moduledoc """
|
||||
When mailer is not configure, use noop adapter as a drop-in replacement
|
||||
so that we don't have to add conditional logic to every single call to
|
||||
`Web.Mailer.deliver/2`.
|
||||
|
||||
# XXX: Having this module in the Domain app is a workaround for the following issue:
|
||||
# https://github.com/elixir-lang/elixir/issues/12777
|
||||
# Move this module back to the Web app once this is fixed.
|
||||
"""
|
||||
use Swoosh.Adapter
|
||||
require Logger
|
||||
@@ -77,6 +77,12 @@ defmodule Domain.MixProject do
|
||||
{:opentelemetry_ecto, "~> 1.1"},
|
||||
{:opentelemetry_finch, "~> 0.2.0"},
|
||||
|
||||
# Mailer deps
|
||||
# XXX: This is a workaround for the following issue:
|
||||
# https://github.com/elixir-lang/elixir/issues/12777
|
||||
# Remove Swoosh from Domain once this is fixed.
|
||||
{:phoenix_swoosh, "~> 1.0"},
|
||||
|
||||
# Test and dev deps
|
||||
{:bypass, "~> 2.1", only: :test},
|
||||
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
|
||||
|
||||
@@ -169,7 +169,7 @@ config :posthog,
|
||||
api_key: "phc_ubuPhiqqjMdedpmbWpG2Ak3axqv5eMVhFDNBaXl9UZK"
|
||||
|
||||
config :web, Web.Mailer,
|
||||
adapter: Web.Mailer.NoopAdapter,
|
||||
adapter: Domain.Mailer.NoopAdapter,
|
||||
from_email: "test@firez.one"
|
||||
|
||||
# TODO: actually copy fonts here, otherwise:application
|
||||
|
||||
Reference in New Issue
Block a user