feat: add [retrieve or check getter function] to/in [fast-router] #6083
Labels
area:fast-router
Pertains to fast-router
community:request
Issues specifically reported by a member of the community.
feature
A new feature
status:under-consideration
Issue is being reviewed by the team.
Milestone
🙋 Feature Request
The Router object currently only supports adding and replacing content, but not listing or checking if a path or name is matching something that has been defined earlier
🤔 Expected Behavior
There could be something like a Route.path/name.check or Route.path/name.list functionality so that it will be possible to check for existing routes when needed
😯 Current Behavior
There is no possibility to read or get data from the Router object
💁 Possible Solution
See expected behavior
🔦 Context
At the moment i am using manually created whitelists to determine which path/name is allowed before linking or even forwarding the URL to it, because sometimes internal links might either be broken, target an unintended area or are not accessible for the active RBAC settings. So it is generally helpful if the active router setup can be checked or validated in some way.
💻 Examples
There is e.g. a forwarding functionality with Route.path.push, but depending on the circumstances and router setup the target URL will vary.
The text was updated successfully, but these errors were encountered: