Use Pleroma.ConfigDB.delete/1 instead of rolling our own
authorMark Felder <feld@FreeBSD.org>
Fri, 4 Dec 2020 17:09:13 +0000 (11:09 -0600)
committerMark Felder <feld@FreeBSD.org>
Fri, 4 Dec 2020 17:09:13 +0000 (11:09 -0600)
lib/mix/tasks/pleroma/config.ex

index d2e9a3760c8b50054cfe990d1276f97654b00d35..7ec791b36598dc3dbc14fce712d8322a38158865 100644 (file)
@@ -323,9 +323,7 @@ defmodule Mix.Tasks.Pleroma.Config do
 
   defp delete_key(group, key) do
     check_configdb(fn ->
-      group
-      |> ConfigDB.get_all_by_group_and_key(key)
-      |> Enum.each(&delete(&1, true))
+      Pleroma.ConfigDB.delete(%{group: group, key: key})
     end)
   end