Update Service

master
Louis DUFOUR 2 years ago
parent c84814b2cf
commit e5373d04e7

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

@ -202,7 +202,7 @@ namespace ValblazeProject.Services
}
/************************ Inventory ************************
public async Task supprInventory(Item item)
public async Task supprInventory()
{
// Get the current data
var currentData = await _localStorage.GetItemAsync<Inventory>("data");

@ -17,8 +17,8 @@ namespace ValblazeProject.Services
/* Inventory
Task<Inventory> getInventory();
Task supprInventory(Item item);
Task postInventory(Item item);
Task putInventory(Item item);*/
Task supprInventory();
Task postInventory();
Task putInventory();*/
}
}

Loading…
Cancel
Save