Last active
August 26, 2019 12:54
-
-
Save rpiotrow/d7d872edfe0c78a1f0988645f014cd20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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