EiSimp / Book-Archive

BookPals
https://book-archive-production.up.railway.app/homepage
0 stars 0 forks source link

Fix Delete Bookshelf Functionality to Use ID #73

Closed elllaPark closed 3 months ago

elllaPark commented 3 months ago

Issue

The delete functionality did not work correctly when multiple bookshelves had the same name. The deletion process has been updated to use the unique ID of the bookshelf instead of the name. Below are the detailed changes made:

Changes

BookshelfService.java

Updated the deleteBookshelf method to accept an ID and delete the bookshelf based on this ID.

BookshelfController.java

Updated the deleteBookshelf endpoint to parse the ID from the request and call the service method with this ID.

homepage.html

Ensured that each bookshelf item contains a hidden element for the bookshelf ID.

bookshelf.js

Updated the event listener to correctly select the ID element within the DOM.