From e6e0c9e62c1946aa8f1f9cd8eadd2ef4c2246063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 16:53:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Node.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index c5264728..dafa2da7 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -529,21 +529,22 @@ class Node extends HttpService private function httpFilter(): mixed { try { + $requestParam = func_get_args(); if ($this->handler instanceof Closure) { - return $this->runWith(...func_get_args()); + return $this->runWith(...$requestParam); } /** @var HttpFilter $filter */ - $filter = Snowflake::app()->get('filter'); - $validator = $filter->check(get_class($this->handler[0]), $this->handler[1]); - if (!($validator instanceof Validator)) { - return $this->runWith(...func_get_args()); - } - - if (!$validator->validation()) { - return Json::to(5005, $validator->getError()); - } - return $this->runWith(...func_get_args()); +// $filter = Snowflake::app()->get('filter'); +// $validator = $filter->check(get_class($this->handler[0]), $this->handler[1]); +// if (!($validator instanceof Validator)) { +// return $this->runWith(...$requestParam); +// } +// +// if (!$validator->validation()) { +// return Json::to(5005, $validator->getError()); +// } + return $this->runWith(...$requestParam); } catch (Throwable $throwable) { $this->addError($throwable, 'throwable');