diff options
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/CommandsController.kt | 12 |
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 |