Don't load all people for search, display series being merged in

This commit is contained in:
Amelia 2025-05-08 13:44:28 +02:00
parent 940fe80609
commit 39b6382467
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
6 changed files with 44 additions and 8 deletions

View file

@ -48,6 +48,13 @@ public class PersonController : BaseApiController
return Ok(await _unitOfWork.PersonRepository.GetPersonDtoByName(name, User.GetUserId()));
}
[HttpGet("search-people")]
public async Task<ActionResult<List<PersonDto>>> SearchPeople([FromQuery] string name)
{
var people = await _unitOfWork.PersonRepository.SearchPeople(name);
return Ok(people.Select(person => _mapper.Map<PersonDto>(person)).ToList());
}
/// <summary>
/// Returns all roles for a Person
/// </summary>