-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add /map endpoint to serve optimized Place data for Map Integration #558
Conversation
Pull Request Test Coverage Report for Build 11691435803Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work 🎉
Here are some short comments
src/entities/Map/utils.ts
Outdated
if (!stats) { | ||
const statsPosition = (place.positions || []).find( | ||
(position) => sceneStats[position] | ||
) | ||
if (statsPosition) { | ||
stats = sceneStats[statsPosition] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind avoiding nest code?
Maybe something like
if (!stats) { | |
const statsPosition = (place.positions || []).find( | |
(position) => sceneStats[position] | |
) | |
if (statsPosition) { | |
stats = sceneStats[statsPosition] | |
} | |
} | |
let statsPosition | |
if (!stats) { | |
statsPosition = (place.positions || []).find( | |
(position) => sceneStats[position] | |
) | |
} | |
if (!stats && statsPosition) { | |
stats = sceneStats[statsPosition] | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎉
This PR introduces a new
/map
endpoint that provides a streamlined dictionary of Place data, keyed by each Place'sbase_position
. The endpoint returns a reduced set of Place information optimized for map fetching by the Explorer, enabling efficient data retrieval and integration.Returned object:
Closes: #551