I have been bashing my head against this project all night, and I know it’s probably a simple problem.
Here is the link to my replit code.
Currently my code gives one of two problems, depending on what I try and change.
- My written functional test for: Test DELETE /api/books/[id] with valid id in db
OR
- The freecodecamp test:
You can send a **DELETE** request to
/api/books/{_id} to delete a book from the collection. The returned response will be the string
delete successful if successful. If no book is found, return the string no book exists
The way it’s written now, it’s passing all the FCC tests, but not my one functional test. It also occasionally will become stuck in a look of running and stopping.
Please, please let me know if you have any ideas, thank you!