RestAPI fixes.
This commit is contained in:
parent
c9e44e977b
commit
1ce0d8db0b
@ -94,12 +94,12 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
public bool DeleteProduct(ProductBindingModel product)
|
||||
[HttpDelete("{id}")]
|
||||
public bool DeleteProduct(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _productLogic.Delete(product);
|
||||
return _productLogic.Delete(new ProductBindingModel { ID = id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -150,12 +150,12 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
public bool DeletePC(PCBindingModel pc)
|
||||
[HttpDelete("{id}")]
|
||||
public bool DeletePC(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _pcLogic.Delete(pc);
|
||||
return _pcLogic.Delete(new PCBindingModel { ID = id});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user