``` fun closestServiceContact(latitude: Double, lo...
# getting-started
b
Copy code
fun closestServiceContact(latitude: Double, longitude: Double): ClosestServiceContact? {
        return runBlocking {
            val locations = async(IO) {
                locationRepository.find(SearchLocationQuery(latitude = latitude, longitude = longitude))
            }
            val businessAreas = async(IO) {
                businessAreaRepository.simpleFullTextSearch()
            }
            val serviceContacts = async(IO) {
                fullTextSearch()
            }
            val employees = async(IO) {
                employeeRepository.fullTextSearch()
            }
            return@runBlocking findFirstMatchingContact(
                    locations.await(),
                    businessAreas.await(),
                    serviceContacts.await(),
                    employees.await()
            )
        }