mirror of
https://github.com/penpot/penpot.git
synced 2026-09-07 04:29:31 +00:00
✨ Add helper for more testable access to config.
This commit is contained in:
parent
5858f3f180
commit
fc619f975c
@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
(ns app.config
|
(ns app.config
|
||||||
"A configuration management."
|
"A configuration management."
|
||||||
|
(:refer-clojure :exclude [get])
|
||||||
(:require
|
(:require
|
||||||
|
[clojure.core :as c]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.common.version :as v]
|
[app.common.version :as v]
|
||||||
[app.util.time :as dt]
|
[app.util.time :as dt]
|
||||||
@ -247,3 +249,10 @@
|
|||||||
|
|
||||||
(def deletion-delay
|
(def deletion-delay
|
||||||
(dt/duration {:days 7}))
|
(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)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user