Remove 404 exception

This commit is contained in:
Valithor Obsidion 2025-02-04 14:50:07 -05:00
parent a90b93b33f
commit d6ee8fca91
2 changed files with 2 additions and 1 deletions

View File

@ -86,6 +86,7 @@ trait SegmentRouterTrait
},
[]
);
var_dump($params);
// if we found a handler for the method, return it and any params. if not, return a 405
return isset($node[$method])

View File

@ -88,7 +88,7 @@ for ($i = 0; $i < 10; $i++) {
$res = SegmentRouter::lookup($routes, $method, $uri);
if ($res['code'] !== 200) {
echo "Failed to handle request for $uri - $res\n";
echo "Failed to handle request for $uri - " . json_encode($res) . "\n";
exit(1);
}
$res['handler'](...$res['params']);