fix check for whether the fail-response needs to be returned

This commit is contained in:
Gered 2015-02-14 20:25:56 -05:00
parent bd8c88d0d4
commit faecfe712d

View file

@ -16,7 +16,8 @@
(defmacro threaded-checks [request checks fail-response]
`(let [result# (pred-> ~request no-errors? ~@checks)]
(if (request? result#)
(if (and (request? result#)
(not (no-errors? result#)))
(if (response? ~fail-response)
~fail-response
(~fail-response result#))