Skip to content

[JITERA] Add Author Routes for CRUD Operations

Klebson Leite requested to merge feat/add-author-routes-1749125701 into main

Created by: kstayner

Overview

This pull request introduces new routes for managing authors in the application. The routes allow for the creation, retrieval, updating, and deletion of author records, enhancing the functionality of the author management system.

Changes Explained

  1. Added Author Routes:

    • Implemented routes for creating, reading, updating, and deleting authors.
    • The routes are defined in src/routes/authorRoutes.js.
  2. GET /authors:

    • Fetches a list of all authors from the database.
  3. GET /authors/:id:

    • Retrieves a specific author by their ID.
  4. POST /authors:

    • Allows the creation of a new author. Expects author details in the request body.
  5. PUT /authors/:id:

    • Updates an existing author's details based on the provided ID.
  6. DELETE /authors/:id:

    • Deletes an author from the database using their ID.
  7. Error Handling:

    • Added basic error handling for each route to ensure proper responses are sent back to the client in case of issues.

This implementation will facilitate better management of authors within the application and provide a solid foundation for future enhancements.

Merge request reports