RestAPI fixes.
This commit is contained in:
parent
a55b6c91ea
commit
c9e44e977b
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user