with :ok <- check_dynamic_configuration(conn) do
updated =
Enum.map(configs, fn
- %{"group" => group, "key" => key, "delete" => "true"} = params ->
+ %{"group" => group, "key" => key, "delete" => true} = params ->
with {:ok, config} <-
Config.delete(%{group: group, key: key, subkeys: params["subkeys"]}) do
config
post(conn, "/api/pleroma/admin/config", %{
configs: [
%{group: config1.group, key: config1.key, value: "another_value"},
- %{group: config2.group, key: config2.key, delete: "true"},
+ %{group: config2.group, key: config2.key, delete: true},
%{
group: "ueberauth",
key: "Ueberauth.Strategy.Microsoft.OAuth",
- delete: "true"
+ delete: true
}
]
})
group: config.group,
key: config.key,
subkeys: [":subkey1", ":subkey3"],
- delete: "true"
+ delete: true
}
]
})