aboutsummaryrefslogtreecommitdiff
path: root/shared/src
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-02-06 22:51:05 -0600
committerIván Ávalos <avalos@disroot.org>2022-02-06 22:51:05 -0600
commitb86898ed1ac5d06d3e3a39cc693cac0a1acc4ef6 (patch)
treea8e213a846b435dff3974792502634aad431bfc8 /shared/src
parenta2387a76bb3b343862baa57e3fe28ed893f6cbda (diff)
downloadetbsa-trackermap-mobile-b86898ed1ac5d06d3e3a39cc693cac0a1acc4ef6.tar.gz
etbsa-trackermap-mobile-b86898ed1ac5d06d3e3a39cc693cac0a1acc4ef6.tar.bz2
etbsa-trackermap-mobile-b86898ed1ac5d06d3e3a39cc693cac0a1acc4ef6.zip
Added CommandsController
Diffstat (limited to 'shared/src')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt12
1 files changed, 12 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
new file mode 100644
index 0000000..bacdb40
--- /dev/null
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt
@@ -0,0 +1,12 @@
+package mx.trackermap.TrackerMap.controllers
+
+import mx.trackermap.TrackerMap.client.apis.CommandsApi
+import mx.trackermap.TrackerMap.client.models.Command
+
+class CommandsController(
+ private val commandsApi: CommandsApi
+) {
+ suspend fun fetchCommands(deviceId: Int): List<Command> {
+ return commandsApi.commandsGet(deviceId = deviceId).toList()
+ }
+} \ No newline at end of file