Fix parameter bug of handler inside the filterFunction DSL
Co-authored-by: hojongs <hojong.jjh@gmail.com> Co-authored-by: bjh970913 <bjh970913@gmail.com> Closes gh-26838
This commit is contained in:
committed by
Sébastien Deleuze
parent
0468ef46ac
commit
07ba95739b
@@ -531,8 +531,8 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
|
||||
fun filter(filterFunction: suspend (ServerRequest, suspend (ServerRequest) -> ServerResponse) -> ServerResponse) {
|
||||
builder.filter { serverRequest, handlerFunction ->
|
||||
mono(Dispatchers.Unconfined) {
|
||||
filterFunction(serverRequest) {
|
||||
handlerFunction.handle(serverRequest).awaitSingle()
|
||||
filterFunction(serverRequest) { handlerRequest ->
|
||||
handlerFunction.handle(handlerRequest).awaitSingle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user