diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-02-07 00:17:49 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-02-07 00:17:49 -0600 |
commit | 8d040f0f02b9462d82fd03041529fdea423f02d3 (patch) | |
tree | bb6bd455b9bf2c05424a17aa89c5aba92f8c36e7 /shared/src/commonMain/kotlin | |
parent | 7610b6506ee3612413cc0b9636c24aadb05c7119 (diff) | |
download | etbsa-trackermap-mobile-8d040f0f02b9462d82fd03041529fdea423f02d3.tar.gz etbsa-trackermap-mobile-8d040f0f02b9462d82fd03041529fdea423f02d3.tar.bz2 etbsa-trackermap-mobile-8d040f0f02b9462d82fd03041529fdea423f02d3.zip |
Added sendCommand() method to CommandsController, and updated Android app to use controller
Diffstat (limited to 'shared/src/commonMain/kotlin')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt | 4 |
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 |