mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-18 15:58:30 +00:00
fix tests
This commit is contained in:
parent
de64c6c54a
commit
1b2c24a19e
|
@ -50,7 +50,6 @@ defmodule Pleroma.Web.Plugs.FrontendStatic do
|
||||||
end
|
end
|
||||||
|
|
||||||
def call(conn, opts) do
|
def call(conn, opts) do
|
||||||
IO.inspect("OPTS: #{inspect(opts)}")
|
|
||||||
with false <- api_route?(conn.path_info),
|
with false <- api_route?(conn.path_info),
|
||||||
false <- invalid_path?(conn.path_info),
|
false <- invalid_path?(conn.path_info),
|
||||||
true <- enabled?(opts[:if]),
|
true <- enabled?(opts[:if]),
|
||||||
|
@ -83,7 +82,7 @@ defmodule Pleroma.Web.Plugs.FrontendStatic do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def preferred_or_fallback(conn, fallback), do: fallback
|
def preferred_or_fallback(_conn, fallback), do: fallback
|
||||||
|
|
||||||
defp enabled?(if_opt) when is_function(if_opt), do: if_opt.()
|
defp enabled?(if_opt) when is_function(if_opt), do: if_opt.()
|
||||||
defp enabled?(true), do: true
|
defp enabled?(true), do: true
|
||||||
|
@ -106,7 +105,6 @@ defmodule Pleroma.Web.Plugs.FrontendStatic do
|
||||||
|
|
||||||
defp call_static(conn, opts, from) do
|
defp call_static(conn, opts, from) do
|
||||||
opts = Map.put(opts, :from, from)
|
opts = Map.put(opts, :from, from)
|
||||||
IO.inspect(opts, label: "opts")
|
|
||||||
Plug.Static.call(conn, opts)
|
Plug.Static.call(conn, opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,6 +83,7 @@ defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
|
||||||
"main",
|
"main",
|
||||||
"ostatus_subscribe",
|
"ostatus_subscribe",
|
||||||
"oauth",
|
"oauth",
|
||||||
|
"akkoma",
|
||||||
"objects",
|
"objects",
|
||||||
"activities",
|
"activities",
|
||||||
"notice",
|
"notice",
|
||||||
|
|
Loading…
Reference in a new issue