This commit is contained in:
2020-09-08 12:02:59 +08:00
parent f394d40698
commit ff3b50f61a
2 changed files with 2 additions and 9 deletions
+1 -8
View File
@@ -40,14 +40,7 @@ class OnRequest extends Callback
if ($sRequest->is('favicon.ico')) {
return $sResponse->send($sRequest->isNotFound(), 200);
}
$node = Snowflake::app()->router->dispatch();
if (!($node instanceof Node)) {
return $sResponse->send($node, 200);
}
$sResponse->send($content = $node->dispatch(), 200);
if ($node->hasAfter()) {
$node->afterDispatch($content);
}
$sResponse->send(Snowflake::app()->router->dispatch(), 200);
} catch (Error | \Throwable $exception) {
$this->sendErrorMessage($sResponse ?? null, $exception, $response);
} finally {