From 1f735bed3153003af779719b32df10331f2c405d Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Thu, 19 Nov 2020 16:16:40 +0100 Subject: [PATCH] Enabled Doctor search by full name on API --- CoviDok/Controllers/DoctorController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CoviDok/Controllers/DoctorController.cs b/CoviDok/Controllers/DoctorController.cs index 744b523..fd499c3 100644 --- a/CoviDok/Controllers/DoctorController.cs +++ b/CoviDok/Controllers/DoctorController.cs @@ -39,6 +39,12 @@ namespace CoviDok.Controllers return await doctorHandler.GetDoctors(lastName: lastName); } + [HttpGet("byName/{firstName}/{lastName}")] + public async Task>> GetDoctorByName(string firstName, string lastName) + { + return await doctorHandler.GetDoctors(lastName: lastName, firstName: firstName); + } + [HttpGet("{id}")] public async Task> GetDoctor(int id) {