Added missing relations to server db model. Started with server crud. Removed unused relations from detail responses

This commit is contained in:
2024-12-17 22:52:09 +01:00
parent 747712c5c4
commit a34a3ba8b4
20 changed files with 1131 additions and 40 deletions

View File

@@ -25,18 +25,6 @@ public class NodesController : Controller
{
CrudHelper = crudHelper;
NodeRepository = nodeRepository;
CrudHelper.QueryModifier = nodes =>
nodes.Include(x => x.Allocations);
CrudHelper.LateMapper = (node, response) =>
{
response.Allocations = node.Allocations
.Select(x => Mapper.Map<NodeAllocationDetailResponse>(x))
.ToArray();
return response;
};
}
[HttpGet]