|
|
@ -64,7 +64,7 @@ namespace ValblazeProject.Services
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/************ Inventory ************
|
|
|
|
/************ Inventory ************
|
|
|
|
public async Task supprInventory(Item item)
|
|
|
|
public async Task supprInventory()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await _http.DeleteAsync("https://localhost:7234/api/Inventory");
|
|
|
|
await _http.DeleteAsync("https://localhost:7234/api/Inventory");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -74,17 +74,17 @@ namespace ValblazeProject.Services
|
|
|
|
return await _http.GetFromJsonAsync<Inventory>("https://localhost:7234/api/Inventory");
|
|
|
|
return await _http.GetFromJsonAsync<Inventory>("https://localhost:7234/api/Inventory");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task putInventory(Item item)
|
|
|
|
public async Task putInventory()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await _http.PutAsJsonAsync($"https://localhost:7234/api/Inventory");
|
|
|
|
await _http.PutAsJsonAsync($"https://localhost:7234/api/Inventory");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public async Task postInventory(Item item)
|
|
|
|
public async Task postInventory()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Get the item
|
|
|
|
// Get the inventory
|
|
|
|
//var inventory = ItemFactory.Create(item);
|
|
|
|
var inventory = ItemFactory.Create(item);
|
|
|
|
|
|
|
|
|
|
|
|
// Save the data
|
|
|
|
// Save the data
|
|
|
|
await _http.PostAsJsonAsync("https://localhost:7234/api/Inventory");
|
|
|
|
await _http.PostAsJsonAsync("https://localhost:7234/api/Inventory", inventory);
|
|
|
|
}*/
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|