This commit is contained in:
parent
f12da8a359
commit
349cee0ce6
19 changed files with 300 additions and 100 deletions
25
lib/mv_web/join_notifier_impl.ex
Normal file
25
lib/mv_web/join_notifier_impl.ex
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
defmodule MvWeb.JoinNotifierImpl do
|
||||
@moduledoc """
|
||||
Default implementation of Mv.Membership.JoinNotifier that delegates to MvWeb.Emails.
|
||||
"""
|
||||
@behaviour Mv.Membership.JoinNotifier
|
||||
|
||||
alias MvWeb.Emails.JoinAlreadyMemberEmail
|
||||
alias MvWeb.Emails.JoinAlreadyPendingEmail
|
||||
alias MvWeb.Emails.JoinConfirmationEmail
|
||||
|
||||
@impl true
|
||||
def send_confirmation(email, token, opts \\ []) do
|
||||
JoinConfirmationEmail.send(email, token, opts)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def send_already_member(email) do
|
||||
JoinAlreadyMemberEmail.send(email)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def send_already_pending(email) do
|
||||
JoinAlreadyPendingEmail.send(email)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue