Email blacklist: Update phrasing again

This commit is contained in:
Alex Gleason 2020-08-03 22:20:49 -05:00
parent 058daf498f
commit 4f57e85ab9
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View file

@ -684,7 +684,7 @@ def register_changeset(struct, params \\ %{}, opts \\ []) do
!String.ends_with?(email, ["@" <> blacklisted_domain, "." <> blacklisted_domain])
end)
if valid?, do: [], else: [credentials: "Invalid credentials"]
if valid?, do: [], else: [email: "Invalid email"]
end)
|> unique_constraint(:nickname)
|> validate_exclusion(:nickname, Config.get([User, :restricted_nicknames]))

View file

@ -956,7 +956,7 @@ test "registers and logs in without :account_activation_required / :account_appr
|> put_req_header("authorization", "Bearer " <> token)
|> post("/api/v1/accounts", params)
assert %{"error" => "{\"credentials\":[\"Invalid credentials\"]}"} =
assert %{"error" => "{\"email\":[\"Invalid email\"]}"} =
json_response_and_validate_schema(conn, 400)
Pleroma.Config.put([User, :email_blacklist], [])