-
-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preloaded API document Improvements #2754
Conversation
Also add a test ensuring that the proper handler is used when default route is overriden.
[ci skip] [skip ci]
[ci skip] [skip ci]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wait to use $this->setting()
or should we do that in a different pull request ? it would make sense in a different pull request of there are other places we can use it, which I believe is the case?
Let's do a separate PR, we'd need to update the used version of |
@@ -204,7 +204,7 @@ protected function setDefaultRoute(RouteCollection $routes) | |||
$factory = $this->container->make(RouteHandlerFactory::class); | |||
$defaultRoute = $this->container->make('flarum.settings')->get('default_route'); | |||
|
|||
if (isset($routes->getRoutes()['GET'][$defaultRoute]['handler'])) { | |||
if (isset($routes->getRouteData()[0]['GET'][$defaultRoute]['handler'])) { | |||
$toDefaultController = $routes->getRoutes()['GET'][$defaultRoute]['handler']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$toDefaultController = $routes->getRoutes()['GET'][$defaultRoute]['handler'];
$toDefaultController = $routes->getRouteData()[0]['GET'][$defaultRoute]['handler'];
Does it need to be modified ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @xiaowu771086986,
Yea we hadn't noticed it at the time and tests didn't catch it, but we did actually fix it not long after here: 1cca4e8
Is this what you meant ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes ,thank you !
Fixes #2752
Changes proposed in this pull request:
Reviewers should focus on:
Confirmed
composer test
).Required changes: