diff --git a/src/main/java/com/staketab/minanames/controller/DomainController.java b/src/main/java/com/staketab/minanames/controller/DomainController.java index 081b897..93b38af 100644 --- a/src/main/java/com/staketab/minanames/controller/DomainController.java +++ b/src/main/java/com/staketab/minanames/controller/DomainController.java @@ -66,8 +66,9 @@ public Page getAccountDomains(@Valid @ParameterObject BaseRequest @Parameter(description = "Domain status") DomainStatus domainStatus, @RequestParam(required = false, defaultValue = "") @Parameter(description = "Domain Name") String searchStr) { + String status = domainStatus != null ? domainStatus.name() : null; SearchParams searchParams = new SearchParams(searchStr); - return domainService.findAllByAccountPageable(request.withSortColumn(sortBy), accountAddress, searchParams, domainStatus.name()); + return domainService.findAllByAccountPageable(request.withSortColumn(sortBy), accountAddress, searchParams, status); } @GetMapping("/simple")