get image saving / uploading working
This commit is contained in:
parent
fd146d622b
commit
a695f791c4
4 changed files with 56 additions and 9 deletions
|
|
@ -1,11 +1,11 @@
|
|||
(ns micro-blog.utils
|
||||
(:require
|
||||
[clojure.pprint :refer [pprint]]
|
||||
[taoensso.telemere :as tel]
|
||||
[malli.core :as m]))
|
||||
|
||||
(defn validate-with-throw [value schema]
|
||||
(if (m/validate schema value)
|
||||
value
|
||||
(do
|
||||
(pprint (m/explain schema value))
|
||||
(tel/log! {:level :error :data {:why (m/explain schema value)}} "Validation failed")
|
||||
(throw (ex-info "Res does not follow schema" {:value value})))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue