Refactor Atom feed caching

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Fixes
Fix tests
Fix tests
This commit is contained in:
Thomas Citharel
2019-03-01 12:57:22 +01:00
parent 35ff742c86
commit 5713670ac9
8 changed files with 169 additions and 113 deletions

View File

@@ -21,10 +21,6 @@ defmodule MobilizonWeb.ActivityPubController do
"application/activity+json, application/ld+json"
]
def actor(conn, %{"name" => _name, "_format" => "atom"} = params) do
MobilizonWeb.FeedController.actor(conn, params)
end
def actor(conn, %{"name" => name}) do
with %Actor{} = actor <- Actors.get_local_actor_by_name(name) do
if conn |> get_req_header("accept") |> is_ap_header() do