Try impliment of delete product button

This commit is contained in:
2025-06-28 14:52:33 -07:00
parent 8aea7d9713
commit 79593592ae
4 changed files with 49 additions and 3 deletions
@@ -103,7 +103,18 @@ namespace MistoxWebsite.Server.Controllers {
}
}
[Route( "api/product/getall" )]
[Route( "api/product/delete" )]
[HttpPost]
public async Task<ActionResult<bool>> DeleteProduct( [FromBody] int productID ) {
try {
await _databaseService.DeleteProduct(productID);
return true;
} catch {
return false;
}
}
[Route("api/product/getall")]
[HttpPost]
public async Task<Product[]> GetAllProducts() {
try {