Updating location schema to tracker user territory and lock visibility

This commit is contained in:
hz
2026-05-18 13:59:33 -05:00
parent dd151c5af1
commit afeb9cf625
23 changed files with 590 additions and 38 deletions
+7 -3
View File
@@ -4,10 +4,14 @@ Tracks hex locations for the territory map.
## Endpoints
- `GET /api/locations` List all known locations.
- `GET /api/locations?minQ=-7&maxQ=7&minR=-7&maxR=7` List a coordinate range.
- `GET /api/locations/{q}/{r}` Fetch one location.
- `GET /api/locations` List visible locations for USER/SUPER, all known locations for SUPER.
- `GET /api/locations?minQ=-7&maxQ=7&minR=-7&maxR=7` List a coordinate range, constrained by visibility for USER.
- `GET /api/locations/{q}/{r}` Fetch one visible location for USER, any known location for SUPER.
- `POST /api/locations/claim` Claim a location for the authenticated user.
- `GET /api/locations/home` Get the authenticated user's home location.
- `POST /api/locations/home` Assign or return the authenticated user's home location.
- `GET /api/locations/visible` Get locations visible to the authenticated user.
- `GET /api/locations/visible?depth=3` Override visibility depth for a request.
- `PUT /api/locations` Upsert location data (SUPER only).
`claim` and `put` require the same JWT issued by AuthApi.