Skip to content

Instantly share code, notes, and snippets.

@rpiotrow
Last active August 26, 2019 12:54
Show Gist options
  • Save rpiotrow/d7d872edfe0c78a1f0988645f014cd20 to your computer and use it in GitHub Desktop.
Save rpiotrow/d7d872edfe0c78a1f0988645f014cd20 to your computer and use it in GitHub Desktop.
class EmployeeRouting<F>(
private val repository: EmployeeRepository<F>,
suspendable: Suspendable<F>): Suspendable<F> by suspendable {
fun Routing.employees(path: String) {
get(path) {
call.respond(repository
.findAll()
.suspended()
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment