package mx.trackermap.TrackerMap.controllers import mx.trackermap.TrackerMap.client.apis.GeofencesApi import mx.trackermap.TrackerMap.client.models.Geofence class GeofenceController(val geofencesApi: GeofencesApi) { var geofences = emptyArray() suspend fun getGeofences () { geofences = geofencesApi.geofencesGet() } fun getGeofence (id: Int) = geofences.find { it.id == id } }