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