feat(api): Актуализация JobResponse под фронт; Template метод GetAll ищет по Job а не JobGroup

This commit is contained in:
Mikhail Kuznetsov
2025-09-10 10:40:12 +10:00
parent aa31af8027
commit d4607f8547
4 changed files with 18 additions and 10 deletions

View File

@@ -69,8 +69,8 @@ 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.JobGroupId.HasValue)
query = query.Where(t => t.Job!.GroupId == filter.JobGroupId.Value);
if (filter.JobId.HasValue)
query = query.Where(t => t.JobId == filter.JobId);
var templates = await templateService.GetPage(query, paginationFilter).ToListAsync();