Fix hardcoded mock data in getMatches function#5
Open
dillonvargo wants to merge 1 commit into
Open
Conversation
- Import findMatches utility from ../utils/matchLogic
- Replace hardcoded movie/food ID arrays with actual user preference matching
- Get real user IDs from session data instead of using mock user IDs
- Convert response format from {category: {itemId: response}} to {category: {yes: [itemIds], no: [itemIds]}}
- Use findMatches utility to compute actual matches based on user preferences
- Maintain same return format {movieMatches: [], foodMatches: []} for UI compatibility
Fixes issue where getMatches function returned fixed data regardless of user responses.
Co-Authored-By: Dillon Vargo <dillonvargo@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for match-n-munch ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix hardcoded mock data in getMatches function
Summary
Replaces hardcoded movie and food match arrays in the
getMatchesfunction with real matching logic that uses actual user preferences. The function now:{category: {itemId: response}}to{category: {yes: [itemIds], no: [itemIds]}}findMatchesutility to compute matches based on overlapping "yes" responses{movieMatches: [], foodMatches: []}for UI compatibilityReview & Testing Checklist for Human
{movies: {id1: 'yes', id2: 'no'}}into the expected format{movies: {yes: ['id1'], no: ['id2']}}Notes
findMatchesutility expects