diff options
author | Lain Soykaf <lain@lain.com> | 2023-11-12 14:49:15 +0400 |
---|---|---|
committer | Lain Soykaf <lain@lain.com> | 2023-11-12 14:49:15 +0400 |
commit | c1402af2934219b6ab5dc40a7d87a8c916554647 (patch) | |
tree | 8e21b42ecf67809ac6fe26c9acab4098f9b7f052 /lib | |
parent | 0c5cc519833166e1c748deb81394af9940c05928 (diff) | |
download | pleroma-c1402af2934219b6ab5dc40a7d87a8c916554647.tar.gz pleroma-c1402af2934219b6ab5dc40a7d87a8c916554647.zip |
B Getting: Add default implementation, delegate, prepare test support.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/config/getting.ex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/config/getting.ex b/lib/pleroma/config/getting.ex index f9b66bba6..0de4782ea 100644 --- a/lib/pleroma/config/getting.ex +++ b/lib/pleroma/config/getting.ex @@ -5,4 +5,11 @@ defmodule Pleroma.Config.Getting do @callback get(any()) :: any() @callback get(any(), any()) :: any() + + def get(key), do: get(key, nil) + def get(key, default), do: impl().get(key, default) + + def impl() do + Application.get_env(:pleroma, :config_impl, Pleroma.Config) + end end |