改名
This commit is contained in:
+12
-11
@@ -529,21 +529,22 @@ class Node extends HttpService
|
|||||||
private function httpFilter(): mixed
|
private function httpFilter(): mixed
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$requestParam = func_get_args();
|
||||||
if ($this->handler instanceof Closure) {
|
if ($this->handler instanceof Closure) {
|
||||||
return $this->runWith(...func_get_args());
|
return $this->runWith(...$requestParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var HttpFilter $filter */
|
/** @var HttpFilter $filter */
|
||||||
$filter = Snowflake::app()->get('filter');
|
// $filter = Snowflake::app()->get('filter');
|
||||||
$validator = $filter->check(get_class($this->handler[0]), $this->handler[1]);
|
// $validator = $filter->check(get_class($this->handler[0]), $this->handler[1]);
|
||||||
if (!($validator instanceof Validator)) {
|
// if (!($validator instanceof Validator)) {
|
||||||
return $this->runWith(...func_get_args());
|
// return $this->runWith(...$requestParam);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (!$validator->validation()) {
|
// if (!$validator->validation()) {
|
||||||
return Json::to(5005, $validator->getError());
|
// return Json::to(5005, $validator->getError());
|
||||||
}
|
// }
|
||||||
return $this->runWith(...func_get_args());
|
return $this->runWith(...$requestParam);
|
||||||
} catch (Throwable $throwable) {
|
} catch (Throwable $throwable) {
|
||||||
$this->addError($throwable, 'throwable');
|
$this->addError($throwable, 'throwable');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user