diff options
| author | unwox <me@unwox.com> | 2025-10-13 23:10:38 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-10-13 23:48:17 +0600 |
| commit | 7f6c204322aa13dd8a9760b311955fc4b9a92637 (patch) | |
| tree | 0c1d66d123398dacc0851b1c1589a7e3730761f5 /shop.fnl | |
| parent | 5cf21fcb8c91896bb2b889dd4a90cc0b2ef3e9e5 (diff) | |
add simple filtering
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} |
