View Source Mobilizon.Reports (Mobilizon v4.1.0-alpha.1)
The Reports context.
Summary
Functions
Counts opened reports.
Creates a note.
Creates a report.
Deletes a note.
Gets a single note.
Gets a single report.
Returns the list of reports.
Updates a report.
Functions
@spec count_opened_reports() :: integer()
Counts opened reports.
@spec create_note(map()) :: {:ok, Mobilizon.Reports.Note.t()} | {:error, Ecto.Changeset.t()}
Creates a note.
@spec create_report(map()) :: {:ok, Mobilizon.Reports.Report.t()} | {:error, Ecto.Changeset.t()}
Creates a report.
@spec delete_note(Mobilizon.Reports.Note.t()) :: {:ok, Mobilizon.Reports.Note.t()} | {:error, Ecto.Changeset.t()}
Deletes a note.
@spec get_note(integer() | String.t()) :: Mobilizon.Reports.Note.t() | nil
Gets a single note.
@spec get_report(integer() | String.t()) :: Mobilizon.Reports.Report.t() | nil
Gets a single report.
@spec list_reports(Keyword.t()) :: Mobilizon.Storage.Page.t(Mobilizon.Reports.Report.t())
Returns the list of reports.
@spec update_report(Mobilizon.Reports.Report.t(), map()) :: {:ok, Mobilizon.Reports.Report.t()} | {:error, Ecto.Changeset.t()}
Updates a report.