Minor change on web_finger_controller

This commit is contained in:
Vincent 2019-04-16 12:50:56 +02:00
parent be169459e4
commit 4c0a43b4d4
2 changed files with 2 additions and 7 deletions

View file

@ -26,9 +26,8 @@ defmodule MobilizonWeb.WebFingerController do
Provides /.well-known/webfinger Provides /.well-known/webfinger
""" """
def webfinger(conn, %{"resource" => resource}) do def webfinger(conn, %{"resource" => resource}) do
with {:ok, response} <- WebFinger.webfinger(resource, "JSON") do case WebFinger.webfinger(resource, "JSON") do
json(conn, response) {:ok, response} -> json(conn, response)
else
_e -> send_resp(conn, 404, "Couldn't find user") _e -> send_resp(conn, 404, "Couldn't find user")
end end
end end

View file

@ -39,10 +39,6 @@ defmodule MobilizonWeb.Router do
plug(:put_secure_browser_headers) plug(:put_secure_browser_headers)
end end
pipeline :nodeinfo do
plug(:accepts, ["html", "application/json"])
end
scope "/api" do scope "/api" do
pipe_through(:graphql) pipe_through(:graphql)