summaryrefslogtreecommitdiff
path: root/pages/shop/_product/edit.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'pages/shop/_product/edit.fnl')
-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