Skip to content

Commit

Permalink
Encode coupon code in delete URL (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
zavan authored Jul 5, 2024
1 parent 42f2274 commit 418c239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/spree/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
Spree.routes.api_tokens = Spree.localizedPathFor('api_tokens')
Spree.routes.ensure_cart = Spree.localizedPathFor('ensure_cart')
Spree.routes.api_v2_storefront_cart_apply_coupon_code = Spree.localizedPathFor('api/v2/storefront/cart/apply_coupon_code')
Spree.routes.api_v2_storefront_cart_remove_coupon_code = function(couponCode) { return Spree.localizedPathFor('api/v2/storefront/cart/remove_coupon_code/' + couponCode) }
Spree.routes.api_v2_storefront_cart_remove_coupon_code = function(couponCode) { return Spree.localizedPathFor('api/v2/storefront/cart/remove_coupon_code/' + encodeURIComponent(couponCode)) }
Spree.routes.api_v2_storefront_destroy_credit_card = function(id) { return Spree.localizedPathFor('api/v2/storefront/account/credit_cards/' + id) }
Spree.routes.product = function(id) { return Spree.localizedPathFor('products/' + id) }
Spree.routes.product_related = function(id) { return Spree.localizedPathFor('products/' + id + '/related') }
Expand Down

0 comments on commit 418c239

Please sign in to comment.