url parameter
This commit is contained in:
+6
-2
@@ -36,14 +36,18 @@
|
||||
(defparameter *template-product* "
|
||||
<body>
|
||||
{{ product }}
|
||||
{% if debug %}
|
||||
debug info!
|
||||
{% endif %}
|
||||
</body>
|
||||
")
|
||||
|
||||
(easy-routes:defroute root ("/") ()
|
||||
(render *template-root* :products (products)))
|
||||
|
||||
(easy-routes:defroute product-route ("/product/:n") (&path (n 'integer))
|
||||
(render *template-product* :product (get-product n)))
|
||||
(easy-routes:defroute product-route ("/product/:n")
|
||||
(&get debug &path (n 'integer))
|
||||
(render *template-product* :product (get-product n) :debug debug))
|
||||
|
||||
(defroute root ("/" :method :get) ()
|
||||
(render-products))
|
||||
|
||||
Reference in New Issue
Block a user