Skip to content

Commit 06611c3

Browse files
committed
fix: correct TSS property annotation and ensure proper rounding in workout mapping
1 parent 83e3a54 commit 06611c3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

boot/src/main/kotlin/org/freekode/tp2intervals/infrastructure/platform/trainerroad/workout/TrainerRoadWorkoutDetailsDTO.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TrainerRoadWorkoutDetailsDTO(
1616
@JsonProperty("IsOutside")
1717
@JsonAlias("isOutside")
1818
val isOutside: Boolean,
19-
@@JsonProperty("Tss")
19+
@JsonProperty("Tss")
2020
@JsonAlias("tss", "TSS", "WorkoutTss", "workoutTss", "TrainingStressScore", "trainingStressScore")
2121
val tss: Double? = null,
2222
@JsonProperty("Duration")

boot/src/main/kotlin/org/freekode/tp2intervals/infrastructure/platform/trainerroad/workout/TrainerRoadWorkoutMapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TrainerRoadWorkoutMapper {
3333
detailsDTO.workoutName,
3434
getDescription(detailsDTO.workoutDescription, removeHtmlTags),
3535
Duration.ofMinutes(detailsDTO.duration.toLong()),
36-
detailsDTO.tss?.roundToInt()
36+
detailsDTO.tss?.roundToInt(),
3737
ExternalData.empty().withTrainerRoad(detailsDTO.id)
3838
)
3939
}

0 commit comments

Comments
 (0)