Skip to content

Commit

Permalink
fix: code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenRobertsHEE committed Nov 20, 2024
1 parent 0095aca commit e081b45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main/java/uk/nhs/hee/trainee/details/api/CctResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public ResponseEntity<CctCalculationDetailDto> createCalculation(
.body(savedCalculation);
}

/**
* Set the CCT end date in a CCT calculation DTO.
*
* @param calculation The CCT calculation details.
*
* @return The CCT calculation with the CCT end date, or Bad Request if the CCT date could not
* be calculated.
*/
@PostMapping("/calculate")
public ResponseEntity<CctCalculationDetailDto> calculateCctDate(
@RequestBody CctCalculationDetailDto calculation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public CctCalculationDetailDto createCalculation(CctCalculationDetailDto dto) {
*
* @param dto The CctCalculationDetailDto to use to calculate the CCT end date.
* @return A copy of the DTO with the CCT end date set, or Optional.empty if the calculation was
* not possible due to invalid data.
* not possible due to invalid data.
*/
public Optional<CctCalculationDetailDto> calculateCctDate(CctCalculationDetailDto dto) {
LocalDate cctDate = LocalDate.MAX; //placeholder
Expand Down

0 comments on commit e081b45

Please sign in to comment.