Skip to content

Conversation

Anorme
Copy link
Owner

@Anorme Anorme commented Sep 29, 2025

This PR introduces a new getDiscoverableProducts model function and refactors the getProducts controller to support dynamic product discovery via keyword search, category filtering, price range, and pagination. The query logic is modularized via buildProductQuery() in src/utils, enabling scalable and review-safe filtering across future endpoints.

Key changes:

  • Added buildProductQuery() utility for layered query construction
  • Introduced getDiscoverableProducts() and countDiscoverableProducts() model functions
  • Refactored getProducts() controller to support search, filter, and pagination
  • Preserved legacy pagination functions for backward compatibility

@RoddyNdego RoddyNdego self-requested a review September 29, 2025 20:33
@Anorme Anorme merged commit c875dff into development Sep 29, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants