Open juanmbellini opened 7 years ago
No entendí el error, pero deleteFromGameList no hace lo que dice su nombre; no saca al juego del shelf, nomás le borra el estado al juego. No debería llamar a removeGameFromShelf?
La cosa es que hay un método del controller que saca juegos de la shelf, pero a su vez, ejecuta cierta lógica (para hacer no se que de la game list del user). Esa misma logica no se ejecuta cuando se le hace un "clear" a la shelf. O sea, se estaría bypasseando esa logica se elimino todos los juegos de una.
Esa lógica la agrego @julianrod94 , necesitaría que me diga que es lo que hace exactamente para dsp moverla al service.
If you see the following line, you will note that some logic is performed in the remove game from shelf method https://github.com/juanmbellini/PowerUp/blob/80f700b355a0d580b4b37d523d9d81ca00766ec0/paw-webapp/webapp/src/main/java/ar/edu/itba/paw/webapp/controller/ShelfJerseyController.java#L227
If executing the clear shelf method, this logic is missing.
https://github.com/juanmbellini/PowerUp/blob/80f700b355a0d580b4b37d523d9d81ca00766ec0/paw-webapp/webapp/src/main/java/ar/edu/itba/paw/webapp/controller/ShelfJerseyController.java#L244
However, there is an issue (issue #23), which requests moving logic to the service layer.