invoke
invoke copied to clipboard
define same multipe uri with different method
for example I have this config
/user/login:
groups: [Admin]
methods: [post]
/user/login:
groups: [Guest]
methods: [get]
It seem yml loader wont load same key twice, is there any solution?
Hmm, that would take a bit of a rewrite to turn the route keys into sets vs just the single item. It's not overly difficult though - I've done it with an internal project that needed this same kind of setup. You're more than welcome to try to tackle it if you'd like or I can see what I can do eventually.
It would involve making an update around two places:
- where it builds out the configuration into an array of the routes/settings
- a change to
findRouteMatch
to work with the subsets vs just the single layer array
sorry for late reply, yeah I can handle it myself. Do you want me to submit PR?
No problem - yes, that'd be great!