diff options
Diffstat (limited to 'shop.fnl')
| -rw-r--r-- | shop.fnl | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -124,6 +124,14 @@ LIMIT 1" [order-id product-name]))))) +(fn update-search-index [tx] + (_G.must + (luna.db.exec-tx tx "DELETE FROM products_search" [])) + (_G.must + (luna.db.exec-tx tx "INSERT INTO products_search + SELECT title, short_description, name + FROM products;" []))) + {: create-order : place-order : finish-order @@ -132,4 +140,5 @@ : create-order-line : delete-order-line : basket - : in-basket?} + : in-basket? + : update-search-index} |
