feat(api): TemplateController - фильтр шаблонов по AppInWorkId

This commit is contained in:
Mikhail Trubnikov
2024-04-11 09:22:43 +10:00
parent 85a1d9be69
commit ce0d4c1fb0
2 changed files with 9 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ namespace PARR.API.Controllers.V1
if (!string.IsNullOrEmpty(filter.Mask))
query = query.Where(t => EF.Functions.Like(t.Name.ToLower(), SqlHelpers.RegexToLike(filter.Mask)));
if (filter.AppInWorkId.HasValue)
query = query.Where(t => t.ApplicationInWorkId == filter.AppInWorkId.Value);
var templates = await templateService.GetPage(query, paginationFilter).ToListAsync();
if (!templates.Any())