Skip to content

[JITERA] Implement Reader Management Module

chi le requested to merge feat/reader-management-module-1748920262 into main

Created by: chi-jitera

Overview

This pull request introduces a new module for managing readers, which includes the implementation of a Reader Model, Service, Controller, and Routes. This module allows for the creation, retrieval, updating, and deletion of reader data through defined API endpoints.

Changes

  1. Reader Model:

    • Created models/Reader.js to define the schema for reader data, including fields such as name, email, and membership status.
  2. Reader Service:

    • Implemented services/readerService.js to encapsulate the business logic for managing readers. This service includes methods for creating, retrieving, updating, and deleting reader records.
  3. Reader Controller:

    • Developed controllers/readerController.js to handle incoming HTTP requests related to readers. This controller interacts with the Reader Service to perform operations based on the requests.
  4. Reader Routes:

    • Defined API endpoints in routes/readerRoutes.js for CRUD operations on readers. This includes routes for creating a new reader, fetching all readers, updating a reader, and deleting a reader.
  5. Update server.js:

    • Modified server.js to include the newly created reader routes, ensuring that the application can handle requests related to readers.

These changes collectively create a robust module for managing readers, facilitating easy integration and usage within the application.

Merge request reports