Try impliment of delete product button
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user