Email blacklist: Update phrasing again
authorAlex Gleason <alex@alexgleason.me>
Tue, 4 Aug 2020 03:20:49 +0000 (22:20 -0500)
committerAlex Gleason <alex@alexgleason.me>
Tue, 4 Aug 2020 03:20:49 +0000 (22:20 -0500)
lib/pleroma/user.ex
test/web/mastodon_api/controllers/account_controller_test.exs

index 16679ac4276119789deaf10e1d5e2104f1419ec4..9e03373debb8d004d286d6b2a32f0d43722ef997 100644 (file)
@@ -684,7 +684,7 @@ defmodule Pleroma.User 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]))
index 86e3ac3e78f2de0ea2462adde08743a044b4d994..17a1e7d661f9234102c28807e54ee0fa7ea8953a 100644 (file)
@@ -956,7 +956,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
         |> 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], [])