File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/kotlin/application/presenter/api/serializer Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ object ApiSerializer {
3737 )
3838
3939 /* *
40- * Extension method to convert [Room] API DTO to [application.presenter.api.model. RoomApiDto] class.
40+ * Extension method to convert [Room] to [RoomApiDto] class.
4141 */
4242 fun Room.toRoomApiDto (): RoomApiDto = RoomApiDto (
4343 id = this .id.value,
@@ -47,7 +47,10 @@ object ApiSerializer {
4747 environmentalData = this .environmentalData.toEnvironmentDataApiDto(),
4848 )
4949
50- private fun RoomEnvironmentalData.toEnvironmentDataApiDto () = EnvironmentalDataApiDto (
50+ /* *
51+ * Extension method to convert [RoomEnvironmentalData] to [EnvironmentalDataApiDto] class.
52+ */
53+ fun RoomEnvironmentalData.toEnvironmentDataApiDto () = EnvironmentalDataApiDto (
5154 temperature = this .temperature?.let { ValueWithUnit (it.value, it.unit.toString()) },
5255 humidity = this .humidity?.percentage,
5356 luminosity = this .luminosity?.let { ValueWithUnit (it.value, it.unit.toString()) },
You can’t perform that action at this time.
0 commit comments