改名
This commit is contained in:
@@ -581,13 +581,19 @@ class Node extends HttpService
|
|||||||
if (!is_array($this->handler)) {
|
if (!is_array($this->handler)) {
|
||||||
return $this->runWith(...func_get_args());
|
return $this->runWith(...func_get_args());
|
||||||
}
|
}
|
||||||
[$class, $method] = $this->handler;
|
|
||||||
|
|
||||||
/** @var HttpFilter $filter */
|
try {
|
||||||
$filter = Snowflake::app()->get('filter');
|
[$class, $method] = $this->handler;
|
||||||
$validator = $filter->check(get_class($class), $method);
|
|
||||||
if ($validator instanceof Validator && !$validator->validation()) {
|
/** @var HttpFilter $filter */
|
||||||
return Json::to(401, $validator->getError());
|
$filter = Snowflake::app()->get('filter');
|
||||||
|
$validator = $filter->check(get_class($class), $method);
|
||||||
|
if ($validator instanceof Validator && !$validator->validation()) {
|
||||||
|
return Json::to(401, $validator->getError());
|
||||||
|
}
|
||||||
|
} catch (Throwable $throwable) {
|
||||||
|
$this->error($throwable->getMessage());
|
||||||
|
return Json::to(401, $throwable->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->runWith(...func_get_args());
|
return $this->runWith(...func_get_args());
|
||||||
|
|||||||
Reference in New Issue
Block a user