add Mapper.kt with Node.Response.toDeviceResponse

This commit is contained in:
2024-11-30 20:40:51 +01:00
parent 893423c586
commit 47bfa9802c

View File

@@ -0,0 +1,10 @@
package ltd.hlaeja.util
import ltd.hlaeja.library.deviceConfiguration.Node
fun Node.Response.toDeviceResponse(): Map<String, String> {
return mapOf(
"version" to timestamp.toEpochSecond().toString(),
"data" to configuration
)
}