Pleroma.Web.AdminAPI.ConfigController: fix dialyzer errors with replace_params: false
This commit is contained in:
parent
dec82a6a36
commit
ef1f301756
|
@ -9,7 +9,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigController do
|
||||||
alias Pleroma.ConfigDB
|
alias Pleroma.ConfigDB
|
||||||
alias Pleroma.Web.Plugs.OAuthScopesPlug
|
alias Pleroma.Web.Plugs.OAuthScopesPlug
|
||||||
|
|
||||||
plug(Pleroma.Web.ApiSpec.CastAndValidate)
|
plug(Pleroma.Web.ApiSpec.CastAndValidate, replace_params: false)
|
||||||
plug(OAuthScopesPlug, %{scopes: ["admin:write"]} when action == :update)
|
plug(OAuthScopesPlug, %{scopes: ["admin:write"]} when action == :update)
|
||||||
|
|
||||||
plug(
|
plug(
|
||||||
|
@ -76,7 +76,7 @@ def descriptions(conn, _params) do
|
||||||
json(conn, translate_descriptions(descriptions))
|
json(conn, translate_descriptions(descriptions))
|
||||||
end
|
end
|
||||||
|
|
||||||
def show(conn, %{only_db: true}) do
|
def show(%{private: %{open_api_spex: %{params: %{only_db: true}}}} = conn, _) do
|
||||||
with :ok <- configurable_from_database() do
|
with :ok <- configurable_from_database() do
|
||||||
configs = Pleroma.Repo.all(ConfigDB)
|
configs = Pleroma.Repo.all(ConfigDB)
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ def show(conn, _params) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update(%{body_params: %{configs: configs}} = conn, _) do
|
def update(%{private: %{open_api_spex: %{body_params: %{configs: configs}}}} = conn, _) do
|
||||||
with :ok <- configurable_from_database() do
|
with :ok <- configurable_from_database() do
|
||||||
results =
|
results =
|
||||||
configs
|
configs
|
||||||
|
|
Loading…
Reference in New Issue