Phoenix.Router.routes/1 is the public function we are meant to be using here

This commit is contained in:
Mark Felder 2023-06-03 14:17:49 -04:00
parent c665d53295
commit 63ef1dcedc

View File

@ -1003,9 +1003,8 @@ defmodule Pleroma.Web.Router do
options("/*path", RedirectController, :empty)
end
# TODO: Change to Phoenix.Router.routes/1 for Phoenix 1.6.0+
def get_api_routes do
__MODULE__.__routes__()
Phoenix.Router.routes(__MODULE__)
|> Enum.reject(fn r -> r.plug == Pleroma.Web.Fallback.RedirectController end)
|> Enum.map(fn r ->
r.path