Created
September 4, 2019 21:44
-
-
Save parzibyte/1314b5df7f691a94d3ea671350aeece1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PostMapping(value = "/quitar/{indice}") | |
public String quitarDelCarrito(@PathVariable int indice, HttpServletRequest request) { | |
ArrayList<ProductoParaVender> carrito = this.obtenerCarrito(request); | |
if (carrito != null && carrito.size() > 0 && carrito.get(indice) != null) { | |
carrito.remove(indice); | |
this.guardarCarrito(carrito, request); | |
} | |
return "redirect:/vender/"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment