add Mapper.kt with Node.Response.toDeviceResponse
This commit is contained in:
10
src/main/kotlin/ltd/hlaeja/util/Mapper.kt
Normal file
10
src/main/kotlin/ltd/hlaeja/util/Mapper.kt
Normal 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
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user