Commit 2ac66954 authored by Mayel's avatar Mayel

root route

parent 9b5e0cd8
Pipeline #28864412 failed with stages
in 9 minutes and 12 seconds
......@@ -360,24 +360,25 @@ defmodule Pleroma.Web.Router do
get("/:sig/:url", MediaProxyController, :remote)
end
# scope "/", Fallback do
# get("/registration/:token", RedirectController, :registration_page)
# get("/*path", RedirectController, :redirector)
# end
scope "/", Fallback do
get("/registration/:token", RedirectController, :registration_page)
get("/*path", RedirectController, :redirector)
end
end
# defmodule Fallback.RedirectController do
# use Pleroma.Web, :controller
# def redirector(conn, _params) do
# if Mix.env() != :test do
# conn
# |> put_resp_content_type("text/html")
# |> send_file(200, "priv/static/index.html")
# end
# end
# def registration_page(conn, params) do
# redirector(conn, params)
# end
# end
defmodule Fallback.RedirectController do
use Pleroma.Web, :controller
def redirector(conn, _params) do
if Mix.env() != :test do
conn
|> put_resp_content_type("text/html")
|> send_file(200, "priv/static/index.html")
end
end
def registration_page(conn, params) do
redirector(conn, params)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment