Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the GET user neighbors APIs by adding a new endpoint for user-to-user recommendations and fixing a bug in the existing user neighbors endpoint. The main issue being addressed is the incorrect category parameter being passed to the search function, which was filtering results incorrectly.
- Adds new
/user-to-user/{name}/{user-id}endpoint that aligns with the item-to-item pattern - Fixes bug in
/user/{user-id}/neighborsendpoint where[]string{""}was incorrectly passed as categories instead ofnil - Adds test coverage for both the new endpoint and the fixed endpoint
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/rest.go | Adds new getUserToUser handler and fixes category parameter bug in getUserNeighbors by passing nil instead of []string{""} |
| server/rest_test.go | Adds TestUserToUser to verify both /user-to-user/{name}/{user-id} and /user/{user-id}/neighbors endpoints return expected results |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1110 +/- ##
==========================================
+ Coverage 71.09% 71.14% +0.05%
==========================================
Files 86 86
Lines 15066 15071 +5
==========================================
+ Hits 10711 10723 +12
+ Misses 3299 3291 -8
- Partials 1056 1057 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.