Allows undoing autopayments
This commit is contained in:
@@ -296,11 +296,18 @@
|
||||
(try
|
||||
(handler request)
|
||||
(catch Throwable e
|
||||
(if (= :notification (:type (ex-data e)))
|
||||
(cond
|
||||
(= :notification (:type (ex-data e)))
|
||||
{:status 200
|
||||
:headers {"hx-trigger" (cheshire/generate-string
|
||||
{"notification" (str (hiccup/html [:div (.getMessage e)]))})
|
||||
"hx-reswap" "none"}}
|
||||
(= :warning (:type (ex-data e)))
|
||||
{:status 200
|
||||
:headers {"hx-trigger" (cheshire/generate-string
|
||||
{"notification" (str (hiccup/html [:div (.getMessage e)]))})
|
||||
"hx-reswap" "none"}} ;; TODO make a warning box so you don't have to reuse the notifaction box, or make it reuse the same box but theme differently
|
||||
:else
|
||||
{:status 500
|
||||
:body (pr-str e)})))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user