Skip to content

[JITERA] Add Author Routes for CRUD Operations

Klebson Leite requested to merge feat/add-author-routes-1749119730 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.

Changes Explained

  1. Added Author Routes:

    • Implemented routes in src/routes/authorRoutes.js for handling CRUD operations:
      • POST /authors: Create a new author.
      • GET /authors: Retrieve a list of all authors.
      • GET /authors/:id: Retrieve a specific author by ID.
      • PUT /authors/:id: Update an existing author by ID.
      • DELETE /authors/:id: Delete an author by ID.
  2. Controller Integration:

    • Integrated the routes with corresponding controller functions to handle the business logic for each operation.
  3. Error Handling:

    • Added basic error handling to ensure that appropriate responses are sent back to the client in case of failures.
  4. Testing:

    • Included unit tests for the new routes to ensure they function as expected.

This enhancement will allow users to manage authors effectively within the application.

Merge request reports