Adding barracks
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user