Skip to content

Commit

Permalink
Fix: #3183, Fix: #3171 - Router fails wtih optional tree parameter fo…
Browse files Browse the repository at this point in the history
…r private trees
  • Loading branch information
fisharebest committed Apr 20, 2020
1 parent aadd14b commit b59ec43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Http/Routes/WebRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,13 @@ public function load(Map $router): void
$router->get('example', '/…');
});

$router->get('module', '/module/{module}/{action}{/tree}', ModuleAction::class)
// Match module routes, with and without a tree.
$router->get('module-tree', '/module/{module}/{action}/{tree}', ModuleAction::class)
->allows(RequestMethodInterface::METHOD_POST);
$router->get('module-no-tree', '/module/{module}/{action}', ModuleAction::class)
->allows(RequestMethodInterface::METHOD_POST);
// Generate module routes only. The router cannot distinguish a private tree from no tree.
$router->get('module', '/module/{module}/{action}{/tree}', null);

$router->get(HelpText::class, '/help/{topic}', HelpText::class);
$router->post(SelectLanguage::class, '/language/{language}', SelectLanguage::class);
Expand Down

0 comments on commit b59ec43

Please sign in to comment.