RestAPI fixes.

This commit is contained in:
Yuee Shiness 2023-05-13 21:17:24 +04:00
parent a55b6c91ea
commit c9e44e977b

View File

@ -38,12 +38,12 @@ namespace ComputerStoreRestAPI.Controllers
}
}
[HttpDelete]
public bool DeleteComponent(ComponentBindingModel component)
[HttpDelete("{id}")]
public bool DeleteComponent(int id)
{
try
{
return _componentLogic.Delete(component);
return _componentLogic.Delete(new ComponentBindingModel { ID = id });
}
catch(Exception ex)
{