need_confirmed -> unconfirmed

This commit is contained in:
Maksim Pechnikov 2020-09-25 09:39:49 +03:00
parent cf4f393794
commit 46b420aa60
4 changed files with 5 additions and 5 deletions

View 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

View 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: %{}

View 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

View 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 =