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
This commit is contained in:
parent
97eb160c3e
commit
f9bafc17fb
2 changed files with 21 additions and 1 deletions
|
|
@ -35,6 +35,12 @@ defmodule Pleroma.Web.AdminAPI.FrontendController do
|
|||
end
|
||||
|
||||
defp installed do
|
||||
File.ls!(Pleroma.Frontend.dir())
|
||||
frontend_directory = Pleroma.Frontend.dir()
|
||||
|
||||
if File.exists?(frontend_directory) do
|
||||
File.ls!(frontend_directory)
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue