mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(atlas): removing the last region keeps a country the user marked visited itself
Marking a region wrote its country with source 'manual', the same as ticking the country off by hand, and removing the last region then took the country away whatever its origin, Dawarich confirmations included. A country that only comes in through a region is now stored as 'region', marking it visited afterwards turns it into the user's own mark, and the cascade in unmarkRegion only runs for a country without such a mark. Readers still see 'manual' for those rows, so the country detail, the MCP resource and the plugin RPC answer as before. Rows written before this change stay 'manual' and keep their country. REST, MCP and plugin RPC share the service. The atlas popup on desktop and phone now asks the server whether the country is still marked before it drops it from the map instead of guessing. Refs #2597
This commit is contained in:
@@ -58,7 +58,7 @@ Requires `atlas:read` or `atlas:write` scope.
|
||||
| `list_visited_regions` | List all manually visited sub-country regions for the current user. |
|
||||
| `locate_atlas_region` | Resolve a coordinate to the country and region codes the Atlas map can highlight, which is where the pair `mark_region_visited` expects comes from. A point outside every bundled polygon answers with `null` fields rather than an error. For a postal address use `reverse_geocode` instead. |
|
||||
| `mark_region_visited` | Mark a sub-country region as visited (e.g. `"US-CA"`). |
|
||||
| `unmark_region_visited` | Remove a region from the visited list. |
|
||||
| `unmark_region_visited` | Remove a region from the visited list. Removing the last region of a country also removes the country, unless it was marked visited itself. |
|
||||
| `get_country_atlas_places` | Get places saved in the user's atlas for a specific country. |
|
||||
| `create_bucket_list_item` | Add a destination to your personal bucket list with optional coordinates, country code, target date and `region_code` (a state or province, hatched on the Atlas map). The same destination for the same target date is rejected as a duplicate. |
|
||||
| `update_bucket_list_item` | Update a bucket list item (name, notes, coordinates, target date). |
|
||||
|
||||
Reference in New Issue
Block a user