From 7f6c204322aa13dd8a9760b311955fc4b9a92637 Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 13 Oct 2025 23:10:38 +0600 Subject: add simple filtering --- pages/shop/_product/edit.fnl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pages/shop/_product/edit.fnl') 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 -- cgit v1.2.3