Fix some typespecs

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-04-18 14:38:57 +02:00
parent 714e9216c1
commit 83f2880dd9
33 changed files with 76 additions and 60 deletions

View File

@@ -17,7 +17,7 @@ defmodule Mobilizon.Reports.Report do
@type t :: %__MODULE__{
id: integer(),
content: String.t(),
status: ReportStatus.t(),
status: atom(),
url: String.t(),
reported: Actor.t(),
reporter: Actor.t(),

View File

@@ -99,7 +99,7 @@ defmodule Mobilizon.Reports do
@spec delete_note(Note.t()) :: {:ok, Note.t()} | {:error, Ecto.Changeset.t()}
def delete_note(%Note{} = note), do: Repo.delete(note)
@spec list_reports_query(ReportStatus.t()) :: Ecto.Query.t()
@spec list_reports_query(atom()) :: Ecto.Query.t()
defp list_reports_query(status) do
Report
|> preload([:reported, :reporter, :manager, :event, :comments, :notes])