Modifying endpoint routes to make more sense

This commit is contained in:
TypoMustakes
2023-12-05 14:37:49 +01:00
parent a55354e484
commit 297a1a0f3d
4 changed files with 10 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ using WD7UVN_HFT_2023241.Models;
namespace WD7UVN_HFT_2023241.Endpoint namespace WD7UVN_HFT_2023241.Endpoint
{ {
[ApiController] [ApiController]
[Route("api/database")] [Route("api/Customer")]
public class CustomerController : ControllerBase public class CustomerController : ControllerBase
{ {
public ILogicServices LogicServices { get; set; } public ILogicServices LogicServices { get; set; }

View File

@@ -6,7 +6,7 @@ using WD7UVN_HFT_2023241.Models;
namespace WD7UVN_HFT_2023241.Endpoint namespace WD7UVN_HFT_2023241.Endpoint
{ {
[ApiController] [ApiController]
[Route("api/database")] [Route("api/Employee")]
public class EmployeeController : ControllerBase public class EmployeeController : ControllerBase
{ {
public ILogicServices LogicServices { get; set; } public ILogicServices LogicServices { get; set; }
@@ -22,6 +22,12 @@ namespace WD7UVN_HFT_2023241.Endpoint
return LogicServices.GetSubordinates(id); return LogicServices.GetSubordinates(id);
} }
[HttpGet("WhoWorksInMaintainerTeam/{id}")]
public IQueryable<Employee> WhoWorksInMaintainerTeam(int id)
{
return LogicServices.WhoWorksInMaintainerTeam(id);
}
[HttpGet()] [HttpGet()]
public IActionResult ReadAllEmployees() public IActionResult ReadAllEmployees()
{ {

View File

@@ -6,7 +6,7 @@ using WD7UVN_HFT_2023241.Models;
namespace WD7UVN_HFT_2023241.Endpoint namespace WD7UVN_HFT_2023241.Endpoint
{ {
[ApiController] [ApiController]
[Route("api/database")] [Route("api/MaintainerTeam")]
public class MaintainerTeamController : ControllerBase public class MaintainerTeamController : ControllerBase
{ {
public ILogicServices LogicServices { get; set; } public ILogicServices LogicServices { get; set; }

View File

@@ -6,7 +6,7 @@ using WD7UVN_HFT_2023241.Models;
namespace WD7UVN_HFT_2023241.Endpoint namespace WD7UVN_HFT_2023241.Endpoint
{ {
[ApiController] [ApiController]
[Route("api/database")] [Route("api/Service")]
public class ServiceController : ControllerBase public class ServiceController : ControllerBase
{ {
public ILogicServices LogicServices { get; set; } public ILogicServices LogicServices { get; set; }