Document route-to-region assignment and applied migration

Notes the new PUT /api/routes/{id}/region endpoint as a stand-in for
the still-blocked assignAreaToRegion, and removes the stale "migration
pending" caveat now that AddRegionManagement has been applied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-31 11:11:25 +05:30
parent bfbfe352ee
commit c0432a448f
3 changed files with 15 additions and 10 deletions
+9 -4
View File
@@ -584,10 +584,6 @@ All four of these endpoints return `404` if the region doesn't exist, the caller
required region scope, or (for agency mapping) the target user doesn't hold the `RegionalAgency`
role — the response body carries no distinction between "not found" and "forbidden".
No EF Core migration for `RegionalTarget`/`RegionalBudget`/`RegionAgencyMap`/`RegionalTaxRule` has
been applied yet — these endpoints will 500 against a database that hasn't run the pending
migration.
---
### 6.6 Routes
@@ -600,6 +596,7 @@ migration.
| `GET` | `/api/routes/{id}` | `routes.view` | Get route by ID |
| `POST` | `/api/routes` | `routes.create` | Create route |
| `PUT` | `/api/routes/{id}` | `routes.update` | Update route |
| `PUT` | `/api/routes/{id}/region` | `routes.update` | Assign/reassign the route to a region |
| `DELETE` | `/api/routes/{id}` | `routes.delete` | Delete route |
**Create/Update request:**
@@ -627,6 +624,14 @@ migration.
}
```
**Assign to region request:**
```json
// PUT /api/routes/{id}/region
{ "regionId": "guid" }
```
Returns the same `RouteResponse` shape as above. `404` if the route or the target region doesn't
exist (or either is inactive).
---
### 6.7 Vehicles