Search in sources :

Example 1 with RoleDTO

use of com.nexblocks.authguard.api.dto.entities.RoleDTO in project AuthGuard by AuthGuard.

the class RolesRoute method create.

public void create(final Context context) {
    final CreateRoleRequestDTO role = createRoleRequestBodyHandler.getValidated(context);
    final RoleDTO created = Optional.of(role).map(restMapper::toBO).map(rolesService::create).map(restMapper::toDTO).orElseThrow();
    context.status(201).json(created);
}
Also used : RoleDTO(com.nexblocks.authguard.api.dto.entities.RoleDTO) CreateRoleRequestDTO(com.nexblocks.authguard.api.dto.requests.CreateRoleRequestDTO)

Aggregations

RoleDTO (com.nexblocks.authguard.api.dto.entities.RoleDTO)1 CreateRoleRequestDTO (com.nexblocks.authguard.api.dto.requests.CreateRoleRequestDTO)1