A few fixes comming from Dialyser
Signed-off-by: Thomas Citharel <tcit@tcit.fr> Fixes Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -213,7 +213,7 @@ defmodule Mobilizon.Actors.Actor do
|
||||
@doc """
|
||||
Get a public key for a given ActivityPub actor ID (url)
|
||||
"""
|
||||
@spec get_public_key_for_url(String.t()) :: {:ok, String.t()}
|
||||
@spec get_public_key_for_url(String.t()) :: {:ok, String.t()} | {:error, atom()}
|
||||
def get_public_key_for_url(url) do
|
||||
with {:ok, %Actor{keys: keys}} <- Actors.get_or_fetch_by_url(url),
|
||||
{:ok, public_key} <- prepare_public_key(keys) do
|
||||
|
||||
@@ -579,6 +579,7 @@ defmodule Mobilizon.Events do
|
||||
@doc """
|
||||
Create a relation between two tags
|
||||
"""
|
||||
@spec create_tag_relation(map()) :: {:ok, TagRelation.t()} | {:error, Ecto.Changeset.t()}
|
||||
def create_tag_relation(attrs \\ {}) do
|
||||
%TagRelation{}
|
||||
|> TagRelation.changeset(attrs)
|
||||
|
||||
Reference in New Issue
Block a user