This pull request introduces a new Mongoose model for books, encapsulating all necessary fields and validations for book entries in our database. It also updates the book routes file to correctly reference the new model file location.
# Summary
Added a new Mongoose `bookSchema` in `models/book.model.js` with fields for `title`, `author`, `year`, `category`, and `cover`. The `title`, `author`, and `year` fields are marked as required, and `category` is restricted to a predefined list of genres.
Set a default value for the `cover` field to an empty string.
Updated the import statement in `routes/book.routes.js` to correctly reference the new `book.model.js` file.
Fixes #132.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
# Description
This pull request introduces a new Mongoose model for books, encapsulating all necessary fields and validations for book entries in our database. It also updates the book routes file to correctly reference the new model file location.
# Summary
Fixes #132.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.