mix format

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-08-03 10:19:28 +02:00
parent e1e9b0fc11
commit 2eb2c23af3
6 changed files with 39 additions and 20 deletions

View File

@@ -44,6 +44,7 @@ defmodule EventosWeb.GroupController do
conn
|> put_status(:not_found)
|> render(EventosWeb.ErrorView, "not_found.json", details: "group or actor doesn't exist")
err ->
require Logger
Logger.debug(inspect(err))

View File

@@ -15,7 +15,7 @@ defmodule EventosWeb.ErrorView do
def render("not_found.json", %{details: details}) do
%{
msg: "Resource not found",
details: details,
details: details
}
end

View File

@@ -11,8 +11,6 @@ defmodule EventosWeb.FollowerView do
end
def render("follower.json", %{follower: follower}) do
%{id: follower.id,
approved: follower.approved,
score: follower.score}
%{id: follower.id, approved: follower.approved, score: follower.score}
end
end

View File

@@ -324,10 +324,13 @@ defmodule Eventos.Service.ActivityPub.Utils do
def pem_to_public_key(pem) do
[key_code] = :public_key.pem_decode(pem)
key = :public_key.pem_entry_decode(key_code)
case key do
{:RSAPrivateKey, _, modulus, exponent, _, _, _, _, _, _, _} ->
{:RSAPublicKey, modulus, exponent}
{:RSAPublicKey, modulus, exponent} -> {:RSAPublicKey, modulus, exponent}
{:RSAPublicKey, modulus, exponent} ->
{:RSAPublicKey, modulus, exponent}
end
end