flag for delete fix

This commit is contained in:
Alexander 2019-12-26 10:05:30 +03:00 committed by Alexander Strizhakov
parent 0b02040327
commit c841174de8
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
2 changed files with 4 additions and 4 deletions

View file

@ -815,7 +815,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
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

View file

@ -2330,11 +2330,11 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
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
}
]
})
@ -2741,7 +2741,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
group: config.group,
key: config.key,
subkeys: [":subkey1", ":subkey3"],
delete: "true"
delete: true
}
]
})