Make tests great again !

(Also use only one field for public/private key pem)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-06-14 17:25:55 +02:00
parent 32596c3624
commit ca36dd12e2
43 changed files with 498 additions and 656 deletions

View File

@@ -13,7 +13,8 @@ defmodule EventosWeb.ActivityPub.ActorView do
import Ecto.Query
def render("actor.json", %{actor: actor}) do
{:ok, public_key} = Actor.get_public_key_for_actor(actor)
pem = Actor.get_keys_for_actor(actor)
public_key = Eventos.Service.ActivityPub.Utils.pem_to_public_key_pem(pem)
%{
"id" => actor.url,

View File

@@ -12,7 +12,9 @@ defmodule EventosWeb.CommentView do
def render("comment.json", %{comment: comment}) do
%{id: comment.id,
uuid: comment.uuid,
url: comment.url,
text: comment.text}
text: comment.text
}
end
end