diff options
author | Mark Felder <feld@feld.me> | 2021-02-25 13:04:08 -0600 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-02-25 13:04:08 -0600 |
commit | 2da71a526f9c628370b783ff371858f7fe831b32 (patch) | |
tree | c403397db96239a77cabb58d4d4283d4fa92528d | |
parent | 155217979287999c69d9506f6fdb9697833e8fa0 (diff) | |
download | pleroma-2da71a526f9c628370b783ff371858f7fe831b32.tar.gz |
No need to filter out Mix.env() from the API routes.
-rw-r--r-- | lib/pleroma/web.ex | 8 | ||||
-rw-r--r-- | test/pleroma/web/plugs/frontend_static_plug_test.exs | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/pleroma/web.ex b/lib/pleroma/web.ex index 0a4c98e47..a638bb198 100644 --- a/lib/pleroma/web.ex +++ b/lib/pleroma/web.ex @@ -28,8 +28,6 @@ defmodule Pleroma.Web do alias Pleroma.Web.Plugs.OAuthScopesPlug alias Pleroma.Web.Plugs.PlugHelper - @mix_env Mix.env() - def controller do quote do use Phoenix.Controller, namespace: Pleroma.Web @@ -238,11 +236,7 @@ defmodule Pleroma.Web do def get_api_routes do Pleroma.Web.Router.__routes__() - |> Enum.reject(fn - r -> - r.plug == Pleroma.Web.Fallback.RedirectController or - String.starts_with?(r.path, "/#{@mix_env}") - end) + |> Enum.reject(fn r -> r.plug == Pleroma.Web.Fallback.RedirectController end) |> Enum.map(fn r -> r.path |> String.split("/", trim: true) diff --git a/test/pleroma/web/plugs/frontend_static_plug_test.exs b/test/pleroma/web/plugs/frontend_static_plug_test.exs index 9d59d3f8e..b5801320a 100644 --- a/test/pleroma/web/plugs/frontend_static_plug_test.exs +++ b/test/pleroma/web/plugs/frontend_static_plug_test.exs @@ -96,6 +96,7 @@ defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do "auth", "embed", "proxy", + "test", "user_exists", "check_password" ] |