mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 14:25:17 -04:00
Lots of Bugfixes (#2977)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user