summaryrefslogtreecommitdiff
path: root/pages/shop/_product
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2025-10-13 23:10:38 +0600
committerunwox <me@unwox.com>2025-10-13 23:48:17 +0600
commit7f6c204322aa13dd8a9760b311955fc4b9a92637 (patch)
tree0c1d66d123398dacc0851b1c1589a7e3730761f5 /pages/shop/_product
parent5cf21fcb8c91896bb2b889dd4a90cc0b2ef3e9e5 (diff)
add simple filtering
Diffstat (limited to 'pages/shop/_product')
-rw-r--r--pages/shop/_product/edit.fnl7
1 files changed, 5 insertions, 2 deletions
diff --git a/pages/shop/_product/edit.fnl b/pages/shop/_product/edit.fnl
index 3e4f2f0..3995096 100644
--- a/pages/shop/_product/edit.fnl
+++ b/pages/shop/_product/edit.fnl
@@ -2,6 +2,7 @@
(local templates (require :templates))
(local {: product-form} (require :pages.shop.add))
(local forms (require :forms))
+(local shop (require :shop))
(local lib (require :lib))
(fn find-product [db name]
@@ -69,8 +70,10 @@
authenticated?)))
(do
(lib.with-tx db
- (fn [tx] (update-product tx product-form data
- {:name request.params._product})))
+ (fn [tx]
+ (update-product tx product-form data
+ {:name request.params._product})
+ (shop.update-search-index tx)))
(values 302 {:Location (.. "/shop/" data.name)} ""))))
(values 200 {}
(templates.base