Run mix format and fix a credo check

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-09-09 09:35:50 +02:00
parent 4418275223
commit cc4a59ad1f
6 changed files with 10 additions and 12 deletions

View File

@@ -113,7 +113,6 @@ defmodule Mobilizon.Service.ActivityPub do
end
end
@doc """
Getting an actor from url, eventually creating it
"""

View File

@@ -16,16 +16,17 @@ defmodule Mobilizon.Service.HTTPSignatures.Signature do
require Logger
def key_id_to_actor_url(key_id) do
%{path: path} = uri =
%{path: path} =
uri =
key_id
|> URI.parse()
|> Map.put(:fragment, nil)
uri =
if not is_nil(path) do
Map.put(uri, :path, String.trim_trailing(path, "/publickey"))
else
if is_nil(path) do
uri
else
Map.put(uri, :path, String.trim_trailing(path, "/publickey"))
end
URI.to_string(uri)