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
"""
def webfinger(conn, %{"resource" => resource}) do
with {:ok, response} <- WebFinger.webfinger(resource, "JSON") do
json(conn, response)
else
case WebFinger.webfinger(resource, "JSON") do
{:ok, response} -> json(conn, response)
_e -> send_resp(conn, 404, "Couldn't find user")
end
end

View File

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