diff --git a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/controller/UserDetailsController.java b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/controller/UserDetailsController.java index f47107e274f..8b9188ce7ac 100644 --- a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/controller/UserDetailsController.java +++ b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/controller/UserDetailsController.java @@ -78,7 +78,7 @@ public ResponseWrapper getUserById(@PathVariable("id") St @GetMapping(value = "/users") public ResponseWrapper> getUsers(@RequestParam(value = "pageNumber", defaultValue = "0") @ApiParam(value = "page number for the requested data", defaultValue = "0") int page, @RequestParam(value = "pageSize", defaultValue = "1") @ApiParam(value = "page size for the request data", defaultValue = "1") int size, - @RequestParam(value = "orderBy", defaultValue = "cr_dtimes") @ApiParam(value = "sort the requested data based on param value", defaultValue = "createdDateTime") String orderBy, + @RequestParam(value = "orderBy", defaultValue = "createdDateTime") @ApiParam(value = "sort the requested data based on param value", defaultValue = "createdDateTime") String orderBy, @RequestParam(value = "direction", defaultValue = "DESC") @ApiParam(value = "order the requested data based on param", defaultValue = "DESC") String direction) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); responseWrapper.setResponse(userDetailsService.getUsers(page, size, orderBy, direction)); diff --git a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java index 591a4c7b830..26db3a9ee31 100644 --- a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java +++ b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/service/impl/MachineSpecificationServiceImpl.java @@ -124,7 +124,7 @@ public IdAndLanguageCodeID createMachineSpecification(MachineSpecificationDto ma try { - String uniqueId = generateId(); + String uniqueId = machineSpecification.getId() != null ? machineSpecification.getId() : generateId(); machineSpecification.setId(uniqueId); MachineSpecification entity = MetaDataUtils.setCreateMetaData(machineSpecification, MachineSpecification.class);