show email in confirmation flash

This commit is contained in:
shibao 2022-02-15 17:33:19 -05:00
parent bcceb0434d
commit d9dd61b1a5

View File

@ -32,9 +32,9 @@ defmodule CanneryWeb.UserConfirmationController do
# leaked token giving the user access to the account.
def confirm(conn, %{"token" => token}) do
case Accounts.confirm_user(token) do
{:ok, _} ->
{:ok, %{email: email}} ->
conn
|> put_flash(:info, dgettext("prompts", "User confirmed successfully."))
|> put_flash(:info, dgettext("prompts", "%{email} confirmed successfully.", email: email))
|> redirect(to: "/")
:error ->