url parameter

This commit is contained in:
2026-08-05 01:31:12 +03:00
parent 674d3898de
commit 7115f505a7
+6 -2
View File
@@ -36,14 +36,18 @@
(defparameter *template-product* " (defparameter *template-product* "
<body> <body>
{{ product }} {{ product }}
{% if debug %}
debug info!
{% endif %}
</body> </body>
") ")
(easy-routes:defroute root ("/") () (easy-routes:defroute root ("/") ()
(render *template-root* :products (products))) (render *template-root* :products (products)))
(easy-routes:defroute product-route ("/product/:n") (&path (n 'integer)) (easy-routes:defroute product-route ("/product/:n")
(render *template-product* :product (get-product n))) (&get debug &path (n 'integer))
(render *template-product* :product (get-product n) :debug debug))
(defroute root ("/" :method :get) () (defroute root ("/" :method :get) ()
(render-products)) (render-products))