init blue sky scraping
This commit is contained in:
parent
d72eb668c8
commit
c247774256
4 changed files with 171 additions and 1 deletions
9
src/micro_blog/utils.clj
Normal file
9
src/micro_blog/utils.clj
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(ns micro-blog.utils
|
||||
(:require [malli.core :as m]))
|
||||
|
||||
(defn validate-with-throw [value schema]
|
||||
(if (m/validate schema value)
|
||||
value
|
||||
(do
|
||||
(m/explain schema value)
|
||||
(throw (ex-info "Res does not follow schema" {:value value})))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue