Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] : Query params not returning any data (advanced results middleware) #66

Open
ballyalley-o opened this issue May 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working solved

Comments

@ballyalley-o
Copy link
Owner

Describe the bug
The query param select, sort, limit and page doesn't return any data, but when you dont add any, it returns all the data.

To Reproduce
Steps to reproduce the behavior:

  1. Open Postman
  2. Go to any Get Request that uses advance Results
  3. add a query params, any.
  4. See the empty data param.

Expected behavior
It should return whatever is the query.

Screenshots

{
    "success": true,
    "message": "OK: Request fetched",
    "count": 0,
    "pagination": {},
    "data": []  // <--- This line sends nothing
}

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@ballyalley-o ballyalley-o added the bug Something isn't working label May 2, 2024
@ballyalley-o ballyalley-o self-assigned this May 2, 2024
@ballyalley-o ballyalley-o moved this to 🗂️ Backlog in The Code Coach Projct™ May 2, 2024
@ballyalley-o ballyalley-o moved this from 🗂️ Backlog to Sprint 2 in The Code Coach Projct™ May 2, 2024
@ballyalley-o ballyalley-o moved this from Sprint 2 to In Progress in The Code Coach Projct™ May 2, 2024
ballyalley-o added a commit that referenced this issue May 2, 2024
…are) #66:  🐞 fix(FIXED:  advancedResult middleware bug, removed query modifications.):

// Directly use the req.query object to construct the MongoDB query using the query builder methods. This way, we don't have to convert the object to a string and back, which can introduce unintended modifications
@ballyalley-o ballyalley-o moved this from In Progress to in QA in The Code Coach Projct™ May 2, 2024
@ballyalley-o ballyalley-o moved this from in QA to Done in The Code Coach Projct™ May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solved
Projects
Status: Done
Development

No branches or pull requests

1 participant