Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from UNIR-WG/feature/loans_api
Browse files Browse the repository at this point in the history
Setting default parameters when a POST is executed
  • Loading branch information
devmariodiaz authored Jan 31, 2024
2 parents 1d4695c + a9334df commit 50700e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class LoanRequest {
private Long bookId;
private Long clientId;
private LocalDate returnDate = null;
private Boolean isReturned;
private Integer renewalCount;
private Boolean isReturned = false;
private Integer renewalCount = 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,7 @@ private boolean isExistingClient(String id) {

private boolean isValidSyntaxLoanForNulls(Loan loan)
{
return loan.getBookId() != null
&& loan.getClientId() != null
//&& loan.getReturnDate() != null
&& loan.getIsReturned() != null
&& loan.getRenewalCount() != null;
return loan.getBookId() != null && loan.getClientId() != null;
}

private boolean isValidSyntaxLoanForZeroes(Loan loan)
Expand Down

0 comments on commit 50700e7

Please sign in to comment.