fix(back): Improve error message when requesting reset passwords and new instructions
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
73eb4603b1
commit
1c1d0d47d7
|
@ -303,7 +303,11 @@ defmodule Mobilizon.GraphQL.Resolvers.User do
|
|||
{:error, dgettext("errors", "This email doesn't seem to be valid")}
|
||||
|
||||
{:error, :email_too_soon} ->
|
||||
{:error, dgettext("errors", "You requested again a confirmation email too soon")}
|
||||
{:error,
|
||||
dgettext(
|
||||
"errors",
|
||||
"You requested again a confirmation email too soon. Please try again in a few minutes"
|
||||
)}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -330,7 +334,11 @@ defmodule Mobilizon.GraphQL.Resolvers.User do
|
|||
{:error, dgettext("errors", "No user with this email was found")}
|
||||
|
||||
{:error, :email_too_soon} ->
|
||||
{:error, dgettext("errors", "You requested again a confirmation email too soon")}
|
||||
{:error,
|
||||
dgettext(
|
||||
"errors",
|
||||
"You requested again a password reset email too soon. Please try again in a few minutes"
|
||||
)}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
|
|||
|> post("/api", AbsintheHelpers.mutation_skeleton(mutation))
|
||||
|
||||
assert hd(json_response(res, 200)["errors"])["message"] ==
|
||||
"You requested again a confirmation email too soon"
|
||||
"You requested again a confirmation email too soon. Please try again in a few minutes"
|
||||
|
||||
# Hammer time !
|
||||
Users.update_user(user, %{
|
||||
|
|
Loading…
Reference in a new issue