Skip to content

Chirag: Update pagination to be applicable only when specified#2176

Open
ChiragBellara wants to merge 9 commits into
developmentfrom
chirag-fix-event-creation-on-participation-screen
Open

Chirag: Update pagination to be applicable only when specified#2176
ChiragBellara wants to merge 9 commits into
developmentfrom
chirag-fix-event-creation-on-participation-screen

Conversation

@ChiragBellara
Copy link
Copy Markdown
Contributor

@ChiragBellara ChiragBellara commented Apr 22, 2026

Description

New event creation bug

Related PRS (if any):

This backend PR is related to OneCommunityGlobal/HighestGoodNetworkApp#5182 frontend PR.

Main changes explained:

  • Updated the GET /events to return all events in default scenarios and paginated results when page and limit are specified.

How to test:

  1. check into current branch
  2. do npm install and npm run dev to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. using Postman try hitting the http://localhost:4500/api/events -> you should see all the events at once
  6. again try hitting http://localhost:4500/api/events?page=1&limit=10 -> you should see only the first 10 events.

Screenshots or videos of changes:

GET default scenario GET with page and limit

@ChiragBellara ChiragBellara changed the title fix: update pagination to be applicable only when specified fix: Update pagination to be applicable only when specified Apr 22, 2026
@ChiragBellara ChiragBellara marked this pull request as ready for review April 23, 2026 19:43
@ChiragBellara ChiragBellara changed the title fix: Update pagination to be applicable only when specified Chirag: Update pagination to be applicable only when specified Apr 23, 2026
@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Apr 24, 2026
Copy link
Copy Markdown

@kunchalasireesha kunchalasireesha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work refactoring the helper functions out of the main controller! It's much cleaner now.

I've left a few comments regarding:

Bug Fix: Passing the userId through so waitlist positions show up.

Cleanup: Simplifying the query builder logic.

Once these are addressed, this looks good to go!

Comment thread src/controllers/eventController.js
Comment thread src/controllers/eventController.js
Comment thread src/controllers/eventController.js
Copy link
Copy Markdown

@kunchalasireesha kunchalasireesha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-05-04 at 10 50 16 PM Screenshot 2026-05-04 at 10 50 10 PM lgtm

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants