need_confirmed -> unconfirmed
authorMaksim Pechnikov <parallel588@gmail.com>
Fri, 25 Sep 2020 06:39:49 +0000 (09:39 +0300)
committerMaksim Pechnikov <parallel588@gmail.com>
Thu, 22 Oct 2020 08:50:49 +0000 (11:50 +0300)
lib/pleroma/user/query.ex
lib/pleroma/web/admin_api/controllers/user_controller.ex
test/pleroma/web/admin_api/search_test.exs
test/web/admin_api/controllers/user_controller_test.exs

index 2933e7fb4e9381a9f11ce95b3861dff2ce68f357..711439eef613b046e4294c80cda63b82e411df5c 100644 (file)
@@ -43,7 +43,7 @@ defmodule Pleroma.User.Query do
             active: boolean(),
             deactivated: boolean(),
             need_approval: boolean(),
-            need_confirmed: boolean(),
+            unconfirmed: boolean(),
             is_admin: boolean(),
             is_moderator: boolean(),
             super_users: boolean(),
@@ -157,7 +157,7 @@ defmodule Pleroma.User.Query do
     where(query, [u], u.approval_pending)
   end
 
-  defp compose_query({:need_confirmed, _}, query) do
+  defp compose_query({:unconfirmed, _}, query) do
     where(query, [u], u.confirmation_pending)
   end
 
index 5e049aa0f8d0ed2583251ddb30e633996598fa47..db6ef32201ec9349bc00abdba9da52a962c2156a 100644 (file)
@@ -259,7 +259,7 @@ defmodule Pleroma.Web.AdminAPI.UserController do
     end
   end
 
-  @filters ~w(local external active deactivated need_approval need_confirmed is_admin is_moderator)
+  @filters ~w(local external active deactivated need_approval unconfirmed is_admin is_moderator)
 
   @spec maybe_parse_filters(String.t()) :: %{required(String.t()) => true} | %{}
   defp maybe_parse_filters(filters) when is_nil(filters) or filters == "", do: %{}
index 27ca396e6b8654d523ff7d14f60a145aba8220ea..82da86f7f4333cd8b031284daf826ebceef9b48d 100644 (file)
@@ -184,7 +184,7 @@ defmodule Pleroma.Web.AdminAPI.SearchTest do
       insert(:user)
 
       {:ok, _results, total} = Search.user()
-      {:ok, [^unconfirmed], count} = Search.user(%{need_confirmed: true})
+      {:ok, [^unconfirmed], count} = Search.user(%{unconfirmed: true})
       assert total == 3
       assert count == 1
     end
index 3472580583f5ee2b05265046c7a1f293fb7d92c5..6384f8ddcce1a8a352aa0b1f13ca575029d8cd98 100644 (file)
@@ -644,7 +644,7 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do
 
       result =
         conn
-        |> get("/api/pleroma/admin/users?filters=need_confirmed")
+        |> get("/api/pleroma/admin/users?filters=unconfirmed")
         |> json_response(200)
 
       users =