fix(api): accept notes, marker_type, and position on markers endpoints#770
Open
jrsphoto wants to merge 1 commit intoCrosstalk-Solutions:devfrom
Open
fix(api): accept notes, marker_type, and position on markers endpoints#770jrsphoto wants to merge 1 commit intoCrosstalk-Solutions:devfrom
jrsphoto wants to merge 1 commit intoCrosstalk-Solutions:devfrom
Conversation
The VineJS validators in createMarker and updateMarker silently dropped fields not in their schema. The MapMarker model and DB include notes and marker_type, and GET responses return them, but POST and PATCH would not persist them. updateMarker additionally did not accept latitude/longitude, so markers could not be repositioned via the API after creation. - Add notes and marker_type to both validators and model assignments. - Add latitude/longitude to the update validator. - Add coordinate range validation on both endpoints. Closes Crosstalk-Solutions#768
6fdfed0 to
2849eb9
Compare
chriscrosstalk
approved these changes
Apr 22, 2026
Collaborator
chriscrosstalk
left a comment
There was a problem hiding this comment.
Clean, focused fix — matches the diagnosis in #768 exactly. Coordinate range validation is a nice bonus and fixes a latent problem the original markers feature shipped with. Release-notes entry is in the right spot.
I took the liberty of retargeting from main to dev and rebasing onto current dev (the only conflict was the release-notes section, which I resolved by merging your bullet into the existing Unreleased > Bug Fixes list). Your authorship is preserved on the commit.
Approving. Thanks for the thorough writeup and fast turnaround on the fix.
3 tasks
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.
Fixes #768.
The VineJS validators in
createMarkerandupdateMarkersilently dropped fields not in their schema.notesandmarker_typeexist on the model and are returned by GET responses but could not be set via POST or PATCH.updateMarkeradditionally did not acceptlatitude/longitude, so markers could not be repositioned.Changes:
notesandmarker_typeto both validators and model assignments.latitude/longitudeto the update validator.-90..90,-180..180) on both endpoints.Release notes updated under Unreleased > Bug Fixes.