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:
Thomas Citharel
2019-02-22 16:11:57 +01:00
parent d73f738b1b
commit d37c873b04
8 changed files with 47 additions and 15 deletions

View File

@@ -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

View File

@@ -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)