diff options
| author | unwox <me@unwox.com> | 2025-10-13 21:04:15 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-10-13 23:11:20 +0600 |
| commit | 5cf21fcb8c91896bb2b889dd4a90cc0b2ef3e9e5 (patch) | |
| tree | 05826ed8beb78c736c94158ebe37d67063e38438 /shop.fnl | |
| parent | a7c25a5513e32669978b8e07fc9c61bd15cbdb02 (diff) | |
finishing touches for shop functionality
Diffstat (limited to 'shop.fnl')
| -rw-r--r-- | shop.fnl | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -111,6 +111,19 @@ ORDER BY order_lines.creation_time ASC" [order-id]))) +(fn in-basket? [db order-id product-name] + (= 1 + (# + (_G.must + (luna.db.query + db + "SELECT id + FROM order_lines + WHERE order_lines.order_id = ? + AND order_lines.product_name = ? + LIMIT 1" + [order-id product-name]))))) + {: create-order : place-order : finish-order @@ -118,4 +131,5 @@ : order-id : create-order-line : delete-order-line - : basket} + : basket + : in-basket?} |
