diff --git a/HttpServer/Controller.php b/HttpServer/Controller.php index 42f1ae33..68ff507d 100644 --- a/HttpServer/Controller.php +++ b/HttpServer/Controller.php @@ -74,16 +74,6 @@ class Controller extends HttpService } - /** - * @param Request $request - * @return bool - */ - public function beforeAction(Request $request): bool - { - return true; - } - - /** * @param $name * @return mixed diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 95a31b77..0527abd8 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -129,10 +129,7 @@ class Node extends HttpService if (empty($dispatchParam)) { $dispatchParam = [\request()]; } - if ($this->beforeAction()) { - return \aop($this->handler, $dispatchParam); - } - return response()->close(400); + return \aop($this->handler, $dispatchParam); }; }