server side for getting items from cart
This commit is contained in:
@@ -17,6 +17,7 @@ get '/cart' do
|
||||
Cart.find_or_create(anonymous_id, -1).to_json
|
||||
end
|
||||
|
||||
# gets number of items in cart for every item
|
||||
get '/cart/item' do
|
||||
Cart.find_or_create(anonymous_id, -1).item_in_carts.to_json
|
||||
end
|
||||
@@ -29,5 +30,4 @@ update_cart_item = ->() {
|
||||
ItemInCart.update_state(cart_id, item_id, count).to_json
|
||||
}
|
||||
put '/cart/item', &update_cart_item
|
||||
post '/cart/item', &update_cart_item
|
||||
|
||||
post '/cart/item', &update_cart_item
|
||||
|
||||
Reference in New Issue
Block a user