mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-12 22:11:54 +00:00
changed return
This commit is contained in:
@@ -84,7 +84,6 @@ inventoryGroup.MapPut("/{id}", async (int id, InventoryItems updatedItem, BarkCo
|
||||
return Results.Ok(existingItem);
|
||||
});
|
||||
|
||||
|
||||
inventoryGroup.MapPost("", async (InventoryItems newItemInput, BarkContext db) =>
|
||||
{
|
||||
var newItem = new InventoryItems();
|
||||
@@ -97,7 +96,7 @@ inventoryGroup.MapPost("", async (InventoryItems newItemInput, BarkContext db) =
|
||||
|
||||
db.Inventory.Add(newItem);
|
||||
await db.SaveChangesAsync();
|
||||
return Results.Created($"/inventory/{newItemInput.Id}", newItemInput);
|
||||
return Results.Created($"/inventory/{newItem.Id}", newItem);
|
||||
});
|
||||
|
||||
inventoryGroup.MapDelete("/{id}", async (int id, BarkContext db) =>
|
||||
|
||||
Reference in New Issue
Block a user