feat(api): UserController - CRUD, RoleController
This commit is contained in:
@@ -64,7 +64,7 @@ namespace PARR.API.MappingProfiles
|
||||
CreateMap<DAL.Models.Host, HostTemplateResponse>();
|
||||
|
||||
CreateMap<DAL.Models.Host, HostWithApplicationsResponse>()
|
||||
.ForMember(d => d.Applications, o => o.MapFrom(s => s.ApplicationsInHosts.Select(t => t.Application).OrderBy(t=>t.Name)));
|
||||
.ForMember(d => d.Applications, o => o.MapFrom(s => s.ApplicationsInHosts.Select(t => t.Application).OrderBy(t => t.Name)));
|
||||
// === Host ===
|
||||
|
||||
CreateMap<RobotStatus, RobotStatusResponse>();
|
||||
@@ -161,6 +161,16 @@ namespace PARR.API.MappingProfiles
|
||||
.ForMember(t => t.Date, o => o.MapFrom(s => s.DateCreated))
|
||||
.ForMember(t => t.Level, o => o.MapFrom(s => s.AgentHistoryLevel));
|
||||
|
||||
|
||||
#region User
|
||||
|
||||
CreateMap<User, UserResponse>()
|
||||
.ForMember(t => t.Roles, o => o.MapFrom(s => s.Roles.Select(t => t.Role).OrderBy(t => t!.Description)));
|
||||
|
||||
CreateMap<Role, RoleResponse>();
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user