Skip to content

Commit a0f7250

Browse files
committed
Simpler generation of child routes
1 parent 2fe4892 commit a0f7250

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/compojure/api/meta.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@
392392

393393
;; for routes, create a separate lookup-function to find the inner routes
394394
child-form (if routes
395-
(let [form `(~body-wrap ~@body)
395+
(let [form (vec body)
396396
form (if (seq letks) `(dummy-letk ~letks ~form) form)
397397
form (if (seq lets) `(dummy-let ~lets ~form) form)
398398
form `(compojure.core/let-request [~arg ~'+compojure-api-request+] ~form)
399399
form `(fn [~'+compojure-api-request+] ~form)]
400400
form))]
401401
(if routes
402-
`(let [childs# ~(if routes [`(~child-form {})] nil)]
402+
`(let [childs# ~(if routes `(~child-form {}) nil)]
403403
(routes/create ~path-string ~method (merge-parameters ~swagger) childs# ~form))
404404
`(routes/create ~path-string ~method (merge-parameters ~swagger) nil ~form))))

0 commit comments

Comments
 (0)