This commit is contained in:
2021-03-05 17:37:12 +08:00
parent 2b3a276625
commit c537a0a53a
+3 -6
View File
@@ -321,9 +321,6 @@ class Node extends HttpService
if (empty($annotation)) {
return $node;
}
if (str_contains($node->path, 'switch/map')) {
var_dump($className, $action, $annotation);
}
foreach ($annotation as $name => $attribute) {
if ($attribute instanceof \Annotation\Route\Interceptor) {
$node->addInterceptor($attribute->interceptor);
@@ -338,6 +335,9 @@ class Node extends HttpService
$node->addLimits($attribute->limits);
}
}
if (!empty($node->handler)) {
$node->callback = Reduce::reduce($node->createDispatch(), $node->annotation($node));
}
return $node;
}
@@ -512,9 +512,6 @@ class Node extends HttpService
if (is_string($closure)) {
$closure = [Snowflake::createObject($closure), 'onHandler'];
}
if (str_contains($this->path, 'switch/map')) {
var_dump($closure, $this->middleware);
}
if (in_array($closure, $this->middleware)) {
continue;
}