Skip to content

109 filter sort#116

Open
Ryaken-Nakamoto wants to merge 6 commits intomainfrom
109-filter-sort
Open

109 filter sort#116
Ryaken-Nakamoto wants to merge 6 commits intomainfrom
109-filter-sort

Conversation

@Ryaken-Nakamoto
Copy link
Copy Markdown

@Ryaken-Nakamoto Ryaken-Nakamoto commented Mar 10, 2026

ℹ️ Issue

Closes #109

📝 Description

Did a bit of bug bashing to run the backend. Not sure if it was running on your end, but after pulling from main I made the following changes:

  1. Added Relation<> to prevent circular dependencies
  2. Changed migrations to *.js from *.ts to enable node to target compiled output
  3. added missing dependencies to various .module files

There was also a preexisting linting error for importing to the backend from the frontend. I disabled it for now with a // eslint* comment, unsure how you want to handle this.

EDIT AFTER PR REVIEW: Updated from 7 endpoints to 1 centralized endpoint to sort and filter. /filter-sort. Tested w/ no filters passed in, almost all of them passed in, and some in isolation. Also tested a case where an empty list was returned. Great callout from @GauriRajesh733 to change to this approach. Made all fields optional, thought it would have good ease of use for consumers of the service. Undefined/[] cases are handled in the service method.

P.S. if you have trouble running the tests I had to regenerate my lock file, didn't commit it but if that is an issue on your end that is probably the solution.

Copy link
Copy Markdown
Collaborator

@GauriRajesh733 GauriRajesh733 left a comment

Choose a reason for hiding this comment

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

looks really good!! im just thinking if we should have one route for filtering and sorting that takes in all criteria at once so that we don't need separate methods for each (something like AnthologyFilterDto and AnthologySortDto). i know initially in the ticket description these methods were separated so lmk if you have any questions or you think the current approach is more appropriate!

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.

Backend filter and sort routes

2 participants