diff options
| author | unwox <me@unwox.com> | 2025-10-03 11:56:37 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-10-13 23:11:01 +0600 |
| commit | 3f5ade2e7a139bb4405437e8fc5546aafc7b05ef (patch) | |
| tree | 77c437958d74b591f11ec207d16749cf207a51e3 /pages/shop/cart/remove.fnl | |
| parent | f5a70e6a446e00969adb866ef2e2d10bf33bc4a8 (diff) | |
WIP shop
Diffstat (limited to 'pages/shop/cart/remove.fnl')
| -rw-r--r-- | pages/shop/cart/remove.fnl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pages/shop/cart/remove.fnl b/pages/shop/cart/remove.fnl index d5e3531..0cdc417 100644 --- a/pages/shop/cart/remove.fnl +++ b/pages/shop/cart/remove.fnl @@ -1,16 +1,13 @@ (local lib (require :lib)) +(local shop (require :shop)) (fn render [request db] (if (= request.method "POST") - (let [order-id (lib.order-id request)] + (let [order-id (shop.order-id request)] (if (and order-id request.body) (do (local body-values (lib.parse-values request.body)) - (_G.must - (luna.db.exec - db - "DELETE FROM order_lines WHERE id = ? AND order_id = ?" - [body-values.id order-id])) + (shop.delete-order-line db body-values.id) (values 302 {:Location (_G.must |
