Fix ex_docs warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-04-07 18:37:44 +02:00
parent 698f78ee9a
commit 7a18d0b2bb
20 changed files with 58 additions and 42 deletions

View File

@@ -19,7 +19,7 @@ defmodule Mobilizon.GraphQL.API.Search do
Searches actors.
"""
@spec search_actors(map(), integer | nil, integer | nil, ActorType.t()) ::
{:ok, Page.t()} | {:error, String.t()}
{:ok, Page.t(Actor.t())} | {:error, String.t()}
def search_actors(%{term: term} = args, page \\ 1, limit \\ 10, result_type) do
term = String.trim(term)
@@ -64,7 +64,7 @@ defmodule Mobilizon.GraphQL.API.Search do
Search events
"""
@spec search_events(map(), integer | nil, integer | nil) ::
{:ok, Page.t()}
{:ok, Page.t(Event.t())}
def search_events(%{term: term} = args, page \\ 1, limit \\ 10) do
term = String.trim(term)
@@ -100,7 +100,7 @@ defmodule Mobilizon.GraphQL.API.Search do
end
# If the search string is an username
@spec process_from_username(String.t()) :: Page.t()
@spec process_from_username(String.t()) :: Page.t(Actor.t())
defp process_from_username(search) do
case ActivityPubActor.find_or_make_actor_from_nickname(search) do
{:ok, %Actor{type: :Group} = actor} ->
@@ -118,7 +118,7 @@ defmodule Mobilizon.GraphQL.API.Search do
end
# If the search string is an URL
@spec process_from_url(String.t()) :: Page.t()
@spec process_from_url(String.t()) :: Page.t(struct())
defp process_from_url(search) do
case ActivityPub.fetch_object_from_url(search) do
{:ok, object} ->