Put custom guards in Web.Utils.Guards
Speeds up recompilation by removing a compile-time cycle on AdminAPI.Search
This commit is contained in:
parent
b553bfd745
commit
d87dfcb5f0
3 changed files with 14 additions and 7 deletions
|
|
@ -10,12 +10,6 @@ defmodule Pleroma.Web.AdminAPI.Search do
|
|||
|
||||
@page_size 50
|
||||
|
||||
defmacro not_empty_string(string) do
|
||||
quote do
|
||||
is_binary(unquote(string)) and unquote(string) != ""
|
||||
end
|
||||
end
|
||||
|
||||
@spec user(map()) :: {:ok, [User.t()], pos_integer()}
|
||||
def user(params \\ %{}) do
|
||||
query =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue