Minor change on web_finger_controller
This commit is contained in:
parent
be169459e4
commit
4c0a43b4d4
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user