Small docker repository to show a demonstration of how to source env and have an initializer service which first sources the env file. Afterwards the other services are launched
Refactor DELETE '/:id' Endpoint to Use DBIC and Postgres DB
Description:
The current DELETE '/:id' endpoint uses a local hash %books to manage book deletion. The task is to refactor this endpoint to use the DBIC (DBIx::Class) ORM and interact with a Postgres database.
Acceptance Criteria:
Refactor the DELETE '/:id' endpoint to remove a book record from the Postgres database using DBIC.
If the book ID is not found, the endpoint should return a 404 status code and an error message in JSON format.
If the book ID exists and is successfully deleted, return a success message in JSON format.
Create unit tests to verify that the DELETE operation works as expected:
Test case for successful deletion.
Test case for trying to delete a non-existent ID, expecting a 404 status.
Tasks:
Update the DELETE '/:id' method in the Book package.