0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 02:28:18 -05:00

Add helper for more testable access to config.

This commit is contained in:
Andrey Antukh 2021-02-11 17:55:23 +01:00
parent 5858f3f180
commit fc619f975c

View file

@ -9,7 +9,9 @@
(ns app.config
"A configuration management."
(:refer-clojure :exclude [get])
(:require
[clojure.core :as c]
[app.common.spec :as us]
[app.common.version :as v]
[app.util.time :as dt]
@ -247,3 +249,10 @@
(def deletion-delay
(dt/duration {:days 7}))
(defn get
"A configuration getter. Helps code be more testable."
([key]
(c/get config key))
([key default]
(c/get config key default)))