feat(dal,api): добавлен индекс в таблицу UnitInValues. В api изменены респонсы Template и Unit.
This commit is contained in:
@@ -249,9 +249,9 @@ namespace PARR.API.Controllers.V1
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (orig.IsParentRelationships != request.isParentRelationships)
|
||||
if (orig.IsParentRelationships != request.IsParentRelationships)
|
||||
{
|
||||
orig.IsParentRelationships = request.isParentRelationships;
|
||||
orig.IsParentRelationships = request.IsParentRelationships;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,11 @@ namespace PARR.API.Controllers.V1
|
||||
if (!units.Any())
|
||||
return NoContent();
|
||||
|
||||
var unitResponse = mapper.Map<List<UnitWithAttributesResponse>>(units);
|
||||
var paginationResponse = new PagedResponse<UnitWithAttributesResponse>(unitResponse, true).GetPaginatedProps(paginationFilter, query);
|
||||
//var unitResponse = mapper.Map<List<UnitWithAttributesResponse>>(units);
|
||||
//var paginationResponse = new PagedResponse<UnitWithAttributesResponse>(unitResponse, true).GetPaginatedProps(paginationFilter, query);
|
||||
|
||||
var unitResponse = mapper.Map<List<UnitRelationshipsAndAttributesResponse>>(units);
|
||||
var paginationResponse = new PagedResponse<UnitRelationshipsAndAttributesResponse>(unitResponse, true).GetPaginatedProps(paginationFilter, query);
|
||||
|
||||
return Ok(paginationResponse);
|
||||
}
|
||||
@@ -89,9 +92,13 @@ namespace PARR.API.Controllers.V1
|
||||
if (unit == null)
|
||||
return NotFound();
|
||||
|
||||
var response = mapper.Map<UnitWithAttributesResponse>(unit);
|
||||
//var response = mapper.Map<UnitWithAttributesResponse>(unit);
|
||||
|
||||
return Ok(new Response<UnitWithAttributesResponse>(response, true));
|
||||
//return Ok(new Response<UnitWithAttributesResponse>(response, true));
|
||||
|
||||
var response = mapper.Map<UnitRelationshipsAndAttributesResponse>(unit);
|
||||
|
||||
return Ok(new Response<UnitRelationshipsAndAttributesResponse>(response, true));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user