aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/frontend.ex8
-rw-r--r--lib/pleroma/web/api_spec/operations/admin/frontend_operation.ex17
2 files changed, 16 insertions, 9 deletions
diff --git a/lib/pleroma/frontend.ex b/lib/pleroma/frontend.ex
index 3413d2fba..b3d4c3325 100644
--- a/lib/pleroma/frontend.ex
+++ b/lib/pleroma/frontend.ex
@@ -8,16 +8,16 @@ defmodule Pleroma.Frontend do
require Logger
def install(name, opts \\ []) do
- cmd_frontend_info = %{
+ frontend_info = %{
"ref" => opts[:ref],
"build_url" => opts[:build_url],
"build_dir" => opts[:build_dir]
}
- config_frontend_info = Config.get([:frontends, :available, name], %{})
-
frontend_info =
- Map.merge(config_frontend_info, cmd_frontend_info, fn _key, config, cmd ->
+ [:frontends, :available, name]
+ |> Config.get(%{})
+ |> Map.merge(frontend_info, fn _key, config, cmd ->
# This only overrides things that are actually set
cmd || config
end)
diff --git a/lib/pleroma/web/api_spec/operations/admin/frontend_operation.ex b/lib/pleroma/web/api_spec/operations/admin/frontend_operation.ex
index 24d23a4e0..9d7d017a2 100644
--- a/lib/pleroma/web/api_spec/operations/admin/frontend_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/admin/frontend_operation.ex
@@ -49,7 +49,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.FrontendOperation do
properties: %{
name: %Schema{type: :string},
git: %Schema{type: :string, format: :uri, nullable: true},
- build_url: %Schema{type: :string, format: :uri},
+ build_url: %Schema{type: :string, format: :uri, nullable: true},
ref: %Schema{type: :string},
installed: %Schema{type: :boolean}
}
@@ -64,12 +64,19 @@ defmodule Pleroma.Web.ApiSpec.Admin.FrontendOperation do
required: [:name],
properties: %{
name: %Schema{
- type: :string,
- nullable: false
+ type: :string
},
ref: %Schema{
- type: :string,
- nullable: false
+ type: :string
+ },
+ file: %Schema{
+ type: :string
+ },
+ build_url: %Schema{
+ type: :string
+ },
+ build_dir: %Schema{
+ type: :string
}
}
}