Browse Source

Enabled Doctor search by full name on API

master
Daniel Gyulai 4 years ago
parent
commit
1f735bed31
  1. 6
      CoviDok/Controllers/DoctorController.cs

6
CoviDok/Controllers/DoctorController.cs

@ -39,6 +39,12 @@ namespace CoviDok.Controllers
return await doctorHandler.GetDoctors(lastName: lastName); return await doctorHandler.GetDoctors(lastName: lastName);
} }
[HttpGet("byName/{firstName}/{lastName}")]
public async Task<ActionResult<ICollection<PublicDoctor>>> GetDoctorByName(string firstName, string lastName)
{
return await doctorHandler.GetDoctors(lastName: lastName, firstName: firstName);
}
[HttpGet("{id}")] [HttpGet("{id}")]
public async Task<ActionResult<PublicDoctor>> GetDoctor(int id) public async Task<ActionResult<PublicDoctor>> GetDoctor(int id)
{ {

Loading…
Cancel
Save