sikri
08/30/2020, 1:38 PMTanVD
08/30/2020, 2:02 PMsikri
08/30/2020, 2:09 PMTanVD
08/30/2020, 2:42 PMsikri
08/30/2020, 6:25 PMrouting {
// koin
get<GetAllUsersEndpoint>().invoke(this)
}
class GetAllUsersEndpoint(
private val usecase: Usecase
) : (Route) -> Route {
fun invoke(route: Route) = route.get("allUsers") {
.... //logic
}
}
but I assume kotless’ ktor parser expect for routes and endpoints do be ALWAYS declared in a body of “routing”
due to the fact that it is for small serverless lambdas, it is not a problem, but imo it should be mentioned anywhere that routes and endpoints SHOULD be declared in routing
DSLTanVD
08/30/2020, 6:35 PMRouting
context. Could you please file an issue?