Adding barracks

This commit is contained in:
hz
2026-05-19 04:42:57 -05:00
parent 34d406e993
commit 78513603ab
10 changed files with 556 additions and 152 deletions
@@ -88,6 +88,11 @@ public class LocationsController : ControllerBase
return NotFound();
}
if (!User.IsInRole("SUPER") && !await _locations.IsAdjacentToOwnedAsync(username, request.Q, request.R))
{
return BadRequest("Territory claims must be adjacent to controlled territory.");
}
var existingLocation = await _locations.GetAsync(request.Q, request.R);
if (existingLocation is not null && !string.IsNullOrWhiteSpace(existingLocation.OwnerUsername))
{