Kill switch
Deploy Promiscuity Auth API / deploy (push) Successful in 47s
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
Deploy Promiscuity Character API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled

This commit is contained in:
Zeeshaun
2026-04-01 20:22:05 +00:00
parent bed8e91bc0
commit c718fb343d
14 changed files with 413 additions and 15 deletions
@@ -48,6 +48,28 @@ public class InventoryController : ControllerBase
return Ok(response);
}
[HttpPost("internal/location-owner/reassign")]
public async Task<IActionResult> ReassignLocationOwnerInventoryInternal([FromBody] InternalReassignLocationInventoryRequest req)
{
var configuredKey = (HttpContext.RequestServices.GetRequiredService<IConfiguration>()["InternalApi:Key"]
?? HttpContext.RequestServices.GetRequiredService<IConfiguration>()["Jwt:Key"]
?? string.Empty).Trim();
var requestKey = (Request.Headers["X-Internal-Api-Key"].FirstOrDefault() ?? string.Empty).Trim();
if (string.IsNullOrWhiteSpace(configuredKey) || !string.Equals(configuredKey, requestKey, StringComparison.Ordinal))
return Unauthorized();
if (string.IsNullOrWhiteSpace(req.ToOwnerId))
return BadRequest("toOwnerId required");
var result = await _inventory.ReassignLocationInventoryOwnersAsync(req.FromOwnerIds, req.ToOwnerId);
if (!result.TargetLocationExists)
return NotFound("Target location not found");
return Ok(new InternalReassignLocationInventoryResponse
{
ReassignedItemCount = result.ReassignedItemCount
});
}
[HttpGet("item-definitions")]
[Authorize(Roles = "USER,SUPER")]
public async Task<IActionResult> ListItemDefinitions()