aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt
index c483f67..03ba5ab 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt
@@ -10,4 +10,8 @@ class CommandsController(
suspend fun fetchCommands(deviceId: Int): List<Command> {
return commandsApi.commandsGet(deviceId = deviceId).toList()
}
+
+ suspend fun sendCommand(command: Command) {
+ commandsApi.commandsSendPost(command)
+ }
} \ No newline at end of file