feat(api): Изменена валидация JobRequest, фильтры аттрибутов могут быть пустыми
This commit is contained in:
@@ -33,10 +33,7 @@ namespace PARR.API.Controllers.V1
|
||||
private readonly IUriService uriService;
|
||||
private readonly IJobService jobService;
|
||||
private readonly ITemplateService templateService;
|
||||
private readonly IJobGroupService jobGroupService;
|
||||
private readonly IValidator<JobRequest> jobValidator;
|
||||
private readonly IUnitFilterService unitFilterService;
|
||||
private readonly IUnitService unitService;
|
||||
|
||||
public JobController(
|
||||
ILogger<JobController> logger,
|
||||
@@ -55,10 +52,7 @@ namespace PARR.API.Controllers.V1
|
||||
this.uriService = uriService;
|
||||
this.jobService = jobService;
|
||||
this.templateService = templateService;
|
||||
this.jobGroupService = jobGroupService;
|
||||
this.jobValidator = jobValidator;
|
||||
this.unitFilterService = unitFilterService;
|
||||
this.unitService = unitService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -88,10 +82,10 @@ namespace PARR.API.Controllers.V1
|
||||
|
||||
query = query
|
||||
.Include(t => t.UnitFilters)
|
||||
.ThenInclude(t => t.FieldFilters.OrderBy(o => o.UnitField!.AihitName))
|
||||
.ThenInclude(t => t.FieldFilters)
|
||||
.ThenInclude(t => t.UnitField)
|
||||
.Include(t => t.UnitFilters)
|
||||
.ThenInclude(t => t.RelationshipFilters.OrderBy(o => o.UnitField!.AihitName))
|
||||
.ThenInclude(t => t.RelationshipFilters)
|
||||
.ThenInclude(t => t.UnitField);
|
||||
}
|
||||
|
||||
@@ -186,10 +180,10 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.Tnk)
|
||||
.Include(t => t.Group)
|
||||
.Include(t => t.UnitFilters)
|
||||
.ThenInclude(t => t.FieldFilters.OrderBy(o => o.UnitField!.AihitName))
|
||||
.ThenInclude(t => t.FieldFilters)
|
||||
.ThenInclude(t => t.UnitField)
|
||||
.Include(t => t.UnitFilters)
|
||||
.ThenInclude(t => t.RelationshipFilters.OrderBy(o => o.UnitField!.AihitName))
|
||||
.ThenInclude(t => t.RelationshipFilters)
|
||||
.FirstOrDefaultAsync(t => t.Id == job.Id);
|
||||
|
||||
var locationUri = uriService.GetUri(ApiRoutes.Job.Get, ApiRoutes.Job.getParam, createdJob!.Id);
|
||||
|
||||
Reference in New Issue
Block a user