diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 551f64cb..a47cd58f 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -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; }