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 {
37
37
)
38
38
39
39
/* *
40
- * Extension method to convert [Room] API DTO to [application.presenter.api.model. RoomApiDto] class.
40
+ * Extension method to convert [Room] to [RoomApiDto] class.
41
41
*/
42
42
fun Room.toRoomApiDto (): RoomApiDto = RoomApiDto (
43
43
id = this .id.value,
@@ -47,7 +47,10 @@ object ApiSerializer {
47
47
environmentalData = this .environmentalData.toEnvironmentDataApiDto(),
48
48
)
49
49
50
- private fun RoomEnvironmentalData.toEnvironmentDataApiDto () = EnvironmentalDataApiDto (
50
+ /* *
51
+ * Extension method to convert [RoomEnvironmentalData] to [EnvironmentalDataApiDto] class.
52
+ */
53
+ fun RoomEnvironmentalData.toEnvironmentDataApiDto () = EnvironmentalDataApiDto (
51
54
temperature = this .temperature?.let { ValueWithUnit (it.value, it.unit.toString()) },
52
55
humidity = this .humidity?.percentage,
53
56
luminosity = this .luminosity?.let { ValueWithUnit (it.value, it.unit.toString()) },
You can’t perform that action at this time.
0 commit comments