use getAChainedMethodCall

This commit is contained in:
Erik Krogh Kristensen
2021-03-18 14:35:10 +01:00
parent 38a9c71380
commit f94f82a0dc

View File

@@ -142,12 +142,12 @@ module Koa {
RoutedRouteHandler() {
router = DataFlow::moduleImport(["@koa/router", "koa-router"]).getAnInvocation() and
call = router.getAMethodCall*() and
call.getMethodName() =
[
"use", "get", "post", "put", "link", "unlink", "delete", "del", "head", "options",
"patch", "all"
] and
call =
router
.getAChainedMethodCall([
"use", "get", "post", "put", "link", "unlink", "delete", "del", "head", "options",
"patch", "all"
]) and
this.flowsTo(call.getArgument(any(int i | i >= 1)))
}