fix: join confirmation mail configuration
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
a7481f6ab1
commit
40a4461d23
12 changed files with 167 additions and 28 deletions
|
|
@ -142,8 +142,22 @@ defmodule MvWeb.JoinLive do
|
|||
case build_submit_attrs(params, socket.assigns.join_fields) do
|
||||
{:ok, attrs} ->
|
||||
case Membership.submit_join_request(attrs, actor: nil) do
|
||||
{:ok, _} -> {:noreply, assign(socket, :submitted, true)}
|
||||
{:error, _} -> validation_error_reply(socket, params)
|
||||
{:ok, _} ->
|
||||
{:noreply, assign(socket, :submitted, true)}
|
||||
|
||||
{:error, :email_delivery_failed} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(
|
||||
:error,
|
||||
gettext(
|
||||
"We could not send the confirmation email. Please try again later or contact support."
|
||||
)
|
||||
)
|
||||
|> assign(:form, to_form(params, as: "join"))}
|
||||
|
||||
{:error, _} ->
|
||||
validation_error_reply(socket, params)
|
||||
end
|
||||
|
||||
{:error, message} ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue