forked from ddrilling/AsbCloudServer
CS2-123: Fixed UserRoleController to user UserRoleService, not CRUD service
This commit is contained in:
parent
576d119674
commit
2f23fbce70
@ -55,7 +55,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ICrudService<WellDto>, CrudServiceBase<WellDto, Well>>();
|
||||
services.AddTransient<ICrudService<CompanyDto>, CrudServiceBase<CompanyDto, Company>>();
|
||||
services.AddTransient<ICrudService<UserDto>, CrudServiceBase<UserDto, User>>();
|
||||
services.AddTransient<ICrudService<UserRoleDto>, CrudServiceBase<UserRoleDto, UserRole>>();
|
||||
services.AddTransient<ICrudService<UserRoleDto>, UserRoleService>();
|
||||
services.AddTransient<ICrudService<TelemetryDto>, CrudServiceBase<TelemetryDto, Telemetry>>();
|
||||
services.AddTransient<ICrudService<DrillParamsDto>, DrillParamsService>();
|
||||
|
||||
|
@ -23,11 +23,14 @@ namespace AsbCloudInfrastructure.Services
|
||||
cacheDb.GetCachedTable<RelationUserRolePermission>((AsbCloudDbContext)context);
|
||||
}
|
||||
|
||||
public override async Task<IEnumerable<UserRoleDto>> GetAllAsync(CancellationToken token = default)
|
||||
public override async Task<PaginationContainer<UserRoleDto>> GetPageAsync(int skip = 0,
|
||||
int take = 32, CancellationToken token = default)
|
||||
{
|
||||
var rolesDtos = await base.GetAllAsync(token);
|
||||
var rolesDtos = await base.GetPageAsync(skip, take,token);
|
||||
|
||||
return rolesDtos.Select(FillUserRoleWithPermissions);
|
||||
rolesDtos.Items = rolesDtos.Items.Select(FillUserRoleWithPermissions).ToList();
|
||||
|
||||
return rolesDtos;
|
||||
}
|
||||
|
||||
public override async Task<UserRoleDto> GetAsync(int id, CancellationToken token = default)
|
||||
|
Loading…
Reference in New Issue
Block a user