Router matching multiple routes to controllers
- Lingua principale
- JavaScript
- Stelle
- 1.6k
- Fork
- 179
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I have the following routes defined:
``` javascript
exports.routes = function (map) {
map.all('admin/:controller/:action');
map.all('admin/:controller/:action/:id');
map.all(':controller/:action');
map.all(':controller/:action/:id');
};
```
When I visit /admin/mycontroller/index, I see in my console that compound is trying to access both:
```
Params: {"controller":"mycontroller","action":"index"} // this is correct
Params: {"controller":"admin","action":"mycontroller","id":"index"}
```
But I was expecting only the first to be routed. Is this a bug? Yes, both routes are valid, but only one is supposed to be executed, not every matching route.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.