get image saving / uploading working

This commit is contained in:
Travis Shears 2025-07-22 18:00:14 +02:00
parent fd146d622b
commit a695f791c4
4 changed files with 56 additions and 9 deletions

View file

@ -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})))))