Verified Commit 53b0dd4e authored by Ilja's avatar Ilja Committed by Haelwenn
Browse files

List available frontends also when no static/frontends folder is present yet

* To see what front ends are installed, it ls static/frontends. When this folder doesn't exists yet, it will return an empty array.
* Installing still works since the folder is created during installation already

Backport of: !3510
parent 09c42ce1
......@@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](
- AdminAPI: Fix rendering reports containing a `nil` object
- Mastodon API: Activity Search fallbacks on status fetching after a DB Timeout/Error
- Mastodon API: Fix crash in Streamer related to reblogging
- AdminAPI: List available frontends when `static/frontends` folder is missing
## 2.4.0 - 2021-08-08
......@@ -35,6 +35,12 @@ def install(%{body_params: params} = conn, _params) do
defp installed do!(Pleroma.Frontend.dir())
frontend_directory = Pleroma.Frontend.dir()
if File.exists?(frontend_directory) do!(frontend_directory)
......@@ -42,6 +42,20 @@ test "it lists available frontends", %{conn: conn} do
refute Enum.any?(response, fn frontend -> frontend["installed"] == true end)
test "it lists available frontends when no frontend folder was created yet", %{conn: conn} do
response =
|> get("/api/pleroma/admin/frontends")
|> json_response_and_validate_schema(:ok)
assert, & &1["name"]) ==[:frontends, :available]), fn {_, map} -> map["name"] end)
refute Enum.any?(response, fn frontend -> frontend["installed"] == true end)
describe "POST /api/pleroma/admin/frontends/install" do
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