This commit is contained in:
parent
6d77a82b9f
commit
d9ec9f3a3e
@ -41,7 +41,7 @@ fun Application.module(testing: Boolean = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
routing {
|
routing {
|
||||||
get("/") {
|
get("/benchmark") {
|
||||||
val requestBody : String = call.receiveText()
|
val requestBody : String = call.receiveText()
|
||||||
val msgObj: MessageObject = gson.fromJson(requestBody,MessageObject::class.java)
|
val msgObj: MessageObject = gson.fromJson(requestBody,MessageObject::class.java)
|
||||||
mqttClient.publish("command/${msgObj.device_id}", message)
|
mqttClient.publish("command/${msgObj.device_id}", message)
|
||||||
|
Loading…
Reference in New Issue
Block a user