Lots of Bugfixes (#2977)
This commit is contained in:
parent
8c629695ef
commit
616ed7a75d
26 changed files with 427 additions and 244 deletions
|
|
@ -50,8 +50,14 @@ public class SearchController : BaseApiController
|
|||
return Ok(await _unitOfWork.SeriesRepository.GetSeriesForChapter(chapterId, User.GetUserId()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Searches against different entities in the system against a query string
|
||||
/// </summary>
|
||||
/// <param name="queryString"></param>
|
||||
/// <param name="includeChapterAndFiles">Include Chapter and Filenames in the entities. This can slow down the search on larger systems</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("search")]
|
||||
public async Task<ActionResult<SearchResultGroupDto>> Search(string queryString)
|
||||
public async Task<ActionResult<SearchResultGroupDto>> Search(string queryString, [FromQuery] bool includeChapterAndFiles = true)
|
||||
{
|
||||
queryString = Services.Tasks.Scanner.Parser.Parser.CleanQuery(queryString);
|
||||
|
||||
|
|
@ -63,7 +69,7 @@ public class SearchController : BaseApiController
|
|||
var isAdmin = await _unitOfWork.UserRepository.IsUserAdminAsync(user);
|
||||
|
||||
var series = await _unitOfWork.SeriesRepository.SearchSeries(user.Id, isAdmin,
|
||||
libraries, queryString);
|
||||
libraries, queryString, includeChapterAndFiles);
|
||||
|
||||
return Ok(series);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue