From 6547bd1744d08c0f494dd617d35c68071b2062f6 Mon Sep 17 00:00:00 2001 From: TypoMustakes Date: Sun, 10 Dec 2023 17:35:40 +0100 Subject: [PATCH] Fixed request format in controllers --- WD7UVN_HFT_2023241.Endpoint/Controllers/CustomerController.cs | 2 +- WD7UVN_HFT_2023241.Endpoint/Controllers/EmployeeController.cs | 2 +- .../Controllers/MaintainerTeamController.cs | 2 +- WD7UVN_HFT_2023241.Endpoint/Controllers/ServiceController.cs | 2 +- .../Controllers/SubOrdinateController.cs | 2 +- .../Controllers/WhoIsResponsibleForServiceController.cs | 2 +- .../Controllers/WhoMaintainsServiceController.cs | 2 +- .../Controllers/WhoUsesServiceController.cs | 2 +- .../Controllers/WhoWorksInMaintainerTeamController.cs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/CustomerController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/CustomerController.cs index e853d30..a1df1b5 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/CustomerController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/CustomerController.cs @@ -23,7 +23,7 @@ namespace WD7UVN_HFT_2023241.Endpoint } [HttpGet("{id}")] - public Customer ReadCustomer([FromQuery] int id) + public Customer ReadCustomer(int id) { return LogicServices.CRUDOperations.ReadCustomer(id); } diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/EmployeeController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/EmployeeController.cs index a646996..9e87735 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/EmployeeController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/EmployeeController.cs @@ -23,7 +23,7 @@ namespace WD7UVN_HFT_2023241.Endpoint } [HttpGet("{id}")] - public Employee ReadEmployee([FromQuery] int id) + public Employee ReadEmployee(int id) { return LogicServices.CRUDOperations.ReadEmployee(id); } diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/MaintainerTeamController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/MaintainerTeamController.cs index 759780c..85dab59 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/MaintainerTeamController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/MaintainerTeamController.cs @@ -23,7 +23,7 @@ namespace WD7UVN_HFT_2023241.Endpoint } [HttpGet("{id}")] - public MaintainerTeam ReadMaintainerTeam([FromQuery] int id) + public MaintainerTeam ReadMaintainerTeam(int id) { return LogicServices.CRUDOperations.ReadMaintainerTeam(id); } diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/ServiceController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/ServiceController.cs index 7314c2d..43ea00b 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/ServiceController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/ServiceController.cs @@ -23,7 +23,7 @@ namespace WD7UVN_HFT_2023241.Endpoint } [HttpGet("{id}")] - public Service ReadService([FromQuery] int id) + public Service ReadService(int id) { return LogicServices.CRUDOperations.ReadService(id); } diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs index 3daac2f..2261d22 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs @@ -16,7 +16,7 @@ namespace WD7UVN_HFT_2023241.Endpoint this.LogicServices = LogicServices; } - [HttpGet("{id}")] + [HttpGet()] public IQueryable GetSubordinates([FromQuery] int id) { return LogicServices.GetSubordinates(id); diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoIsResponsibleForServiceController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoIsResponsibleForServiceController.cs index 32cdf21..dee2422 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoIsResponsibleForServiceController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoIsResponsibleForServiceController.cs @@ -16,7 +16,7 @@ namespace WD7UVN_HFT_2023241.Endpoint this.LogicServices = LogicServices; } - [HttpGet("{id}")] + [HttpGet()] public Employee WhoIsResponsibleForService([FromQuery] int id) { return LogicServices.WhoIsResponsibleForService(id); diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoMaintainsServiceController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoMaintainsServiceController.cs index fb2df87..564d04b 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoMaintainsServiceController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoMaintainsServiceController.cs @@ -16,7 +16,7 @@ namespace WD7UVN_HFT_2023241.Endpoint this.LogicServices = LogicServices; } - [HttpGet("{id}")] + [HttpGet()] public IQueryable WhoUsesService([FromQuery] int id) { return LogicServices.WhoUsesService(id); diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs index fb11c12..2c6feb3 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs @@ -16,7 +16,7 @@ namespace WD7UVN_HFT_2023241.Endpoint this.LogicServices = LogicServices; } - [HttpGet("{id}")] + [HttpGet()] public IQueryable WhoUsesService([FromQuery] int id) { return LogicServices.WhoUsesService(id); diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs index 6c125b3..beb464a 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs @@ -16,7 +16,7 @@ namespace WD7UVN_HFT_2023241.Endpoint this.LogicServices = LogicServices; } - [HttpGet("{id}")] + [HttpGet()] public IQueryable WhoWorksInMaintainerTeam([FromQuery] int id) { return LogicServices.WhoWorksInMaintainerTeam(id);