[Bug]: Driver location endpoint returns stale/off-order telemetry due to missing order_id filter in MongoDB query#843
Conversation
…driver locations (closes KanishJebaMathewM#745)
|
@KanishJebaMathewM I have submitted the fix. Please let me know if any changes are needed! |
|
🎉 Thank you for your contribution! Your pull request has been received and will be reviewed shortly. If you enjoy the project, please consider giving the repository a ⭐. You can also follow my GitHub profile to stay updated on future open-source projects. Thanks for being part of the community! 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe MongoDB query in the "GET DRIVER LOCATION" route is updated to filter telemetry documents by both ChangesDriver Location Telemetry Query Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
92418d9
into
KanishJebaMathewM:main
|
🎉 Thank you for your contribution! Your pull request has been merged successfully. We appreciate your work and look forward to your future contributions. 🚀 |
Fix
Added
order_id: order.idto the MongoDB telemetry filter so the driver location endpoint returns GPS data from the correct order, not a stale or unrelated trip.Changes
backend/api/src/routes/orderRoutes.js (line 1231)
order_id: order.idto the MongoDB.find()filter alongside existingdriver_idfilterCloses #745
Summary by CodeRabbit