fix check for whether the fail-response needs to be returned
This commit is contained in:
parent
bd8c88d0d4
commit
faecfe712d
|
@ -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#))
|
||||
|
|
Reference in a new issue