From c9e44e977b82e6a99af11529f4835091ac23d5fa Mon Sep 17 00:00:00 2001 From: Yuee Shiness Date: Sat, 13 May 2023 21:17:24 +0400 Subject: [PATCH] RestAPI fixes. --- ComputerStoreRestAPI/Controllers/MainController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComputerStoreRestAPI/Controllers/MainController.cs b/ComputerStoreRestAPI/Controllers/MainController.cs index 8909ea7..bd3e8bc 100644 --- a/ComputerStoreRestAPI/Controllers/MainController.cs +++ b/ComputerStoreRestAPI/Controllers/MainController.cs @@ -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) {