Skip to content

[FIX]: Coupons controller get API returning empty array #115

@bhavyaj12

Description

@bhavyaj12

Describe the bug
When fetching the coupons using the api, coupons object is empty despite adding coupons in db, as the db is not imported in the server.js file

To Reproduce
Steps to reproduce the behavior:

  1. Using mockman can check that the GET api - "api/coupon" returns empty

Expected behavior
An array of coupons should be returned instead.

Screenshots

  • Before fix

Screenshot (141)

  • After fix (as per my coupons.db)

Screenshot (143)

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: Chrome Version 102.0.5005.115 (Official Build) (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions