get saving of blue sky posts working
TODO: blue sky tags TODO: blue sky images
This commit is contained in:
parent
c247774256
commit
d6c4254e94
3 changed files with 65 additions and 6 deletions
|
|
@ -1,9 +1,11 @@
|
|||
(ns micro-blog.utils
|
||||
(:require [malli.core :as m]))
|
||||
(:require
|
||||
[clojure.pprint :refer [pprint]]
|
||||
[malli.core :as m]))
|
||||
|
||||
(defn validate-with-throw [value schema]
|
||||
(if (m/validate schema value)
|
||||
value
|
||||
(do
|
||||
(m/explain schema value)
|
||||
(pprint (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