mirror of
https://github.com/penpot/penpot.git
synced 2025-02-16 03:58:20 -05:00
✨ Add helper for more testable access to config.
This commit is contained in:
parent
5858f3f180
commit
fc619f975c
1 changed files with 9 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue