body now optional for response helpers (if just http status is enough)
This commit is contained in:
parent
6f203c26ea
commit
e10a5e08e4
|
@ -6,17 +6,17 @@
|
|||
(-> (response/content body)
|
||||
(response/status status)))
|
||||
|
||||
(defn ok [body] (->response body 200))
|
||||
(defn created [body] (->response body 201))
|
||||
(defn accepted [body] (->response body 202))
|
||||
(defn no-content [body] (->response body 204))
|
||||
(defn ok [& [body]] (->response body 200))
|
||||
(defn created [& [body]] (->response body 201))
|
||||
(defn accepted [& [body]] (->response body 202))
|
||||
(defn no-content [& [body]] (->response body 204))
|
||||
|
||||
(defn moved [body] (->response body 301))
|
||||
(defn found [body] (->response body 302))
|
||||
(defn moved [& [body]] (->response body 301))
|
||||
(defn found [& [body]] (->response body 302))
|
||||
|
||||
(defn bad-request [body] (->response body 400))
|
||||
(defn unauthorized [body] (->response body 401))
|
||||
(defn forbidden [body] (->response body 403))
|
||||
(defn not-found [body] (->response body 404))
|
||||
(defn bad-request [& [body]] (->response body 400))
|
||||
(defn unauthorized [& [body]] (->response body 401))
|
||||
(defn forbidden [& [body]] (->response body 403))
|
||||
(defn not-found [& [body]] (->response body 404))
|
||||
|
||||
(defn error [body] (->response body 500))
|
||||
(defn error [& [body]] (->response body 500))
|
||||
|
|
Reference in a new issue