Skip to content

Commit

Permalink
FINERACT-1971: Added default values for LoanAccountLockApi for paging…
Browse files Browse the repository at this point in the history
… parameters
  • Loading branch information
galovics committed Nov 8, 2023
1 parent 8f3b114 commit 9efe4f7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import lombok.RequiredArgsConstructor;
import org.apache.fineract.cob.data.LoanAccountLockResponseDTO;
Expand Down Expand Up @@ -64,8 +65,10 @@ public class LoanAccountLockApiResource {
@Operation(summary = "List locked loan accounts", description = "Returns the locked loan IDs")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanAccountLockApiResourceSwagger.GetLoanAccountLockResponse.class))) })
public String retrieveLockedAccounts(@Context final UriInfo uriInfo, @QueryParam("page") Integer page,
@QueryParam("limit") Integer limit) {
public String retrieveLockedAccounts(@Context final UriInfo uriInfo, @QueryParam("page") Integer pageParam,
@QueryParam("limit") Integer limitParam) {
int page = Objects.requireNonNullElse(pageParam, 0);
int limit = Objects.requireNonNullElse(limitParam, 50);

List<LoanAccountLock> lockedLoanAccounts = loanAccountLockService.getLockedLoanAccountByPage(page, limit);
LoanAccountLockResponseDTO response = new LoanAccountLockResponseDTO();
Expand Down

0 comments on commit 9efe4f7

Please sign in to comment.