forked from AkkomaGang/akkoma
need_confirmed -> unconfirmed
This commit is contained in:
parent
cf4f393794
commit
46b420aa60
4 changed files with 5 additions and 5 deletions
|
@ -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 @@ defp compose_query({:need_approval, _}, 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
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ def list(conn, params) 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: %{}
|
||||
|
|
|
@ -184,7 +184,7 @@ test "it returns unconfirmed user" 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
|
||||
|
|
|
@ -644,7 +644,7 @@ test "only unconfirmed users", %{conn: conn} do
|
|||
|
||||
result =
|
||||
conn
|
||||
|> get("/api/pleroma/admin/users?filters=need_confirmed")
|
||||
|> get("/api/pleroma/admin/users?filters=unconfirmed")
|
||||
|> json_response(200)
|
||||
|
||||
users =
|
||||
|
|
Loading…
Reference in a new issue