Skip to content

Stats fix#258

Merged
Bahl-Aryan merged 6 commits intomainfrom
stats-fix
Sep 12, 2025
Merged

Stats fix#258
Bahl-Aryan merged 6 commits intomainfrom
stats-fix

Conversation

@nathannwangg
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings September 12, 2025 02:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the dietary restrictions statistics endpoint to improve performance by replacing multiple database queries with a single query and client-side filtering. The change simplifies the logic while maintaining the same output format.

  • Replaces 6 separate database queries with 1 comprehensive query
  • Implements client-side filtering and counting logic
  • Maintains identical response structure and data categorization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Collaborator

@Timothy-Gonzalez Timothy-Gonzalez left a comment

Choose a reason for hiding this comment

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

Way cleaner - make sure to test & verify we get the same results as we do on prod rn. Otherwise, LGTM!

@Bahl-Aryan Bahl-Aryan merged commit ae86230 into main Sep 12, 2025
5 checks passed
@Bahl-Aryan Bahl-Aryan deleted the stats-fix branch September 12, 2025 03:39
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.

4 participants