Adding endpoint to create an inventory location

This commit is contained in:
hz
2025-08-21 00:37:20 -05:00
parent b7c221d765
commit 0ca7a31daa
2 changed files with 39 additions and 0 deletions
+26
View File
@@ -45,6 +45,32 @@ public class LocationController : ControllerBase
return Ok(newLoc);
}
[HttpPost("inventory")]
[Authorize(Roles = "SUPER")]
public async Task<IActionResult> CreateInventory()
{
var inventoryLocation = new Location
{
LocationType = "Inventory",
X = null,
Y = null,
Z = null,
N = null,
NE = null,
E = null,
SE = null,
S = null,
SW = null,
W = null,
NW = null,
Players = new List<string>()
};
await _locationService.CreateAsync(inventoryLocation);
return Ok(inventoryLocation);
}
[HttpPut("{id}")]
[Authorize(Roles = "SUPER")]
public async Task<IActionResult> Update(string id, [FromBody] UpdateLocationRequest req)