Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / lib / pleroma / config / config_db.ex
index 70be17ecf71f0fa77978b7c6d3868763aa5c247f..2f4eb8581dba09e75552acea45388f230f7b9108 100644 (file)
@@ -23,9 +23,9 @@ defmodule Pleroma.ConfigDB do
   ]
 
   schema "config" do
-    field(:key, Pleroma.Config.Type.Atom)
-    field(:group, Pleroma.Config.Type.Atom)
-    field(:value, Pleroma.Config.Type.BinaryValue)
+    field(:key, Pleroma.EctoType.Config.Atom)
+    field(:group, Pleroma.EctoType.Config.Atom)
+    field(:value, Pleroma.EctoType.Config.BinaryValue)
     field(:db, {:array, :string}, virtual: true, default: [])
 
     timestamps()
@@ -331,7 +331,7 @@ defmodule Pleroma.ConfigDB do
   def string_to_elixir_types(":" <> atom), do: String.to_atom(atom)
 
   def string_to_elixir_types(value) do
-    if is_module_name?(value) do
+    if module_name?(value) do
       String.to_existing_atom("Elixir." <> value)
     else
       value
@@ -373,8 +373,8 @@ defmodule Pleroma.ConfigDB do
     end
   end
 
-  @spec is_module_name?(String.t()) :: boolean()
-  def is_module_name?(string) do
+  @spec module_name?(String.t()) :: boolean()
+  def module_name?(string) do
     Regex.match?(~r/^(Pleroma|Phoenix|Tesla|Quack|Ueberauth|Swoosh)\./, string) or
       string in ["Oban", "Ueberauth", "ExSyslogger"]
   end