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.

Link to this function

create_note(attrs \\ %{})

View Source
@spec create_note(map()) ::
  {:ok, Mobilizon.Reports.Note.t()} | {:error, Ecto.Changeset.t()}

Creates a note.

Link to this function

create_report(attrs \\ %{})

View Source
@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.

Returns the list of reports.

Link to this function

update_report(report, attrs)

View Source
@spec update_report(Mobilizon.Reports.Report.t(), map()) ::
  {:ok, Mobilizon.Reports.Report.t()} | {:error, Ecto.Changeset.t()}

Updates a report.