Skip to content

Commit 1d28386

Browse files
committed
config: basic spec checks for fetch macro
1 parent 493e28a commit 1d28386

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/llar/config.clj

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
[slingshot.slingshot :refer [try+]]
1212
[llar.fetchutils :refer [make-reddit-proc]]
1313
[llar.human :as human]
14+
[llar.src :as src]
1415
[llar.fetch.custom]
1516
[llar.fetch.feed]
1617
[llar.fetch.http]
@@ -55,6 +56,8 @@
5556
;; TODO validate pre / post
5657
(defmacro fetch
5758
[src-key src & body]
59+
(s/valid? symbol? src-key)
60+
(s/valid? src/source? src)
5861
(let [{:keys [options tags post pre rm post-fns pre-fns rm-fn]
5962
:or {options #{} tags #{}}}
6063
(apply hash-map body)

0 commit comments

Comments
 (0)