This commit is contained in:
2020-12-17 10:16:21 +08:00
parent 7bfbac0254
commit fa326da8cc
+3 -2
View File
@@ -74,7 +74,7 @@ class Node extends Application
} else { } else {
$this->handler = $handler; $this->handler = $handler;
} }
return $this->restructure(); return $this;
} }
@@ -366,7 +366,7 @@ class Node extends Application
{ {
$limits = Snowflake::app()->getLimits(); $limits = Snowflake::app()->getLimits();
$limits->addLimits($this->path, $limit, $duration, $isBindConsumer); $limits->addLimits($this->path, $limit, $duration, $isBindConsumer);
return $this->restructure(); return $this;
} }
@@ -438,6 +438,7 @@ class Node extends Application
*/ */
public function dispatch(): mixed public function dispatch(): mixed
{ {
$this->restructure();
if (empty($this->callback)) { if (empty($this->callback)) {
return JSON::to(404, $node->_error ?? 'Page not found.'); return JSON::to(404, $node->_error ?? 'Page not found.');
} }