diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-07-26 06:34:41 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-07-26 06:34:41 +0000 |
| commit | 990160783cd48fe79071be2c405888f39b8b08b6 (patch) | |
| tree | 71a95ca0d3edc4fd489888f549246caa5b1e5125 | |
| parent | f1beb945b9d59587ebed303c8aac12c720f0c3ce (diff) | |
| parent | b63b45d2e22a5ff5cc10b0447195074a8b4b5719 (diff) | |
Merged in feature/voucher-cart (pull request #71)
Add query source in get cart API
| -rw-r--r-- | indoteknik_api/controllers/api_v1/cart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/cart.py b/indoteknik_api/controllers/api_v1/cart.py index 5a60fd42..fbed70b0 100644 --- a/indoteknik_api/controllers/api_v1/cart.py +++ b/indoteknik_api/controllers/api_v1/cart.py @@ -14,7 +14,7 @@ class Cart(controller.Controller): user_id = int(user_id) limit = int(kw.get('limit', 0)) offset = int(kw.get('offset', 0)) - query = [('user_id', '=', user_id)] + query = [('user_id', '=', user_id), ('source', '=', 'add_to_cart')] carts = user_cart.search(query, limit=limit, offset=offset, order='create_date desc') data = { 'product_total': user_cart.search_count(query), |
