FlakeId.Ecto.CompatType.t() does not exist

This type is not exported and usable. FlakeId intends to return the type as :uuid, so we replace it in the typespecs with Ecto.UUID.t() which assuages the dialyzer errors

e.g.,

lib/pleroma/bookmark.ex:25:unknown_type
Unknown type: FlakeId.Ecto.CompatType.t/0.
This commit is contained in:
Mark Felder 2024-01-20 16:36:01 -05:00
commit dc8045d766
4 changed files with 12 additions and 12 deletions

View file

@ -23,7 +23,7 @@ defmodule Pleroma.ReportNote do
timestamps()
end
@spec create(FlakeId.Ecto.CompatType.t(), FlakeId.Ecto.CompatType.t(), String.t()) ::
@spec create(Ecto.UUID.t(), Ecto.UUID.t(), String.t()) ::
{:ok, ReportNote.t()} | {:error, Changeset.t()}
def create(user_id, activity_id, content) do
attrs = %{
@ -38,7 +38,7 @@ defmodule Pleroma.ReportNote do
|> Repo.insert()
end
@spec destroy(FlakeId.Ecto.CompatType.t()) ::
@spec destroy(Ecto.UUID.t()) ::
{:ok, ReportNote.t()} | {:error, Changeset.t()}
def destroy(id) do
from(r in ReportNote, where: r.id == ^id)