diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 30e59a21..171a1122 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace HttpServer\Route; -use Annotation\Route\Middleware as RMiddleware; +use Annotation\Route\Middleware; use Closure; use HttpServer\Abstracts\HttpService; use HttpServer\Http\Request; @@ -331,7 +331,7 @@ class Node extends HttpService if ($attribute instanceof \Annotation\Route\After) { $node->addAfter($attribute->after); } - if ($attribute instanceof RMiddleware) { + if ($attribute instanceof Middleware) { $node->addMiddleware($attribute->middleware); } if ($attribute instanceof \Annotation\Route\Limits) { @@ -512,6 +512,9 @@ class Node extends HttpService if (is_string($closure)) { $closure = [Snowflake::createObject($closure), 'onHandler']; } + if (str_contains($this->path, 'switch/map')) { + var_dump($closure); + } if (in_array($closure, $this->middleware)) { continue; }