use more verified routes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-14 19:51:14 -04:00
parent c49140e7f5
commit 56e6eb3609
8 changed files with 36 additions and 30 deletions

View File

@ -25,7 +25,7 @@ defmodule MemexWeb.UserConfirmationController do
"if your email is in our system and it has not been confirmed yet, you will receive an email with instructions shortly."
)
)
|> redirect(to: "/")
|> redirect(to: ~p"/")
end
# Do not log in the user after confirmation to avoid a
@ -35,7 +35,7 @@ defmodule MemexWeb.UserConfirmationController do
{:ok, %{email: email}} ->
conn
|> put_flash(:info, dgettext("prompts", "%{email} confirmed successfully.", email: email))
|> redirect(to: "/")
|> redirect(to: ~p"/")
:error ->
# If there is a current user and the account was already confirmed,
@ -44,7 +44,7 @@ defmodule MemexWeb.UserConfirmationController do
# a warning message.
case conn.assigns do
%{current_user: %{confirmed_at: confirmed_at}} when not is_nil(confirmed_at) ->
redirect(conn, to: "/")
redirect(conn, to: ~p"/")
%{} ->
conn
@ -52,7 +52,7 @@ defmodule MemexWeb.UserConfirmationController do
:error,
dgettext("errors", "user confirmation link is invalid or it has expired.")
)
|> redirect(to: "/")
|> redirect(to: ~p"/")
end
end
end

View File

@ -26,7 +26,7 @@ defmodule MemexWeb.UserResetPasswordController do
"if your email is in our system, you will receive instructions to reset your password shortly."
)
)
|> redirect(to: "/")
|> redirect(to: ~p"/")
end
def edit(conn, _params) do
@ -61,7 +61,7 @@ defmodule MemexWeb.UserResetPasswordController do
:error,
dgettext("errors", "reset password link is invalid or it has expired.")
)
|> redirect(to: "/")
|> redirect(to: ~p"/")
|> halt()
end
end