From d9dd61b1a5dd04a5256f8ee2ec1c63fbb9efc425 Mon Sep 17 00:00:00 2001 From: shibao Date: Tue, 15 Feb 2022 17:33:19 -0500 Subject: [PATCH] show email in confirmation flash --- lib/cannery_web/controllers/user_confirmation_controller.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cannery_web/controllers/user_confirmation_controller.ex b/lib/cannery_web/controllers/user_confirmation_controller.ex index 64a3429..954ae5e 100644 --- a/lib/cannery_web/controllers/user_confirmation_controller.ex +++ b/lib/cannery_web/controllers/user_confirmation_controller.ex @@ -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 ->