Fix nodeinfo path

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-09-03 17:53:31 +02:00
parent 970a40c22e
commit c2875a6189
3 changed files with 15 additions and 8 deletions

View File

@@ -30,6 +30,10 @@ defmodule EventosWeb.Router do
plug(:put_secure_browser_headers)
end
pipeline :nodeinfo do
plug(:accepts, ["html", "application/json"])
end
scope "/api", EventosWeb do
pipe_through(:api)
@@ -67,6 +71,12 @@ defmodule EventosWeb.Router do
resources("/addresses", AddressController, only: [:index, :show])
get("/search/:name", SearchController, :search)
scope "/nodeinfo" do
pipe_through(:nodeinfo)
get("/:version", NodeinfoController, :nodeinfo)
end
end
end
@@ -110,10 +120,6 @@ defmodule EventosWeb.Router do
get("/nodeinfo", NodeinfoController, :schemas)
end
scope "/nodeinfo", EventosWeb do
get("/:version", NodeinfoController, :nodeinfo)
end
scope "/", EventosWeb do
pipe_through(:activity_pub)