veliovgroup / flow-router

🚦 Carefully extended flow-router for Meteor
https://packosphere.com/ostrio/flow-router-extra
BSD 3-Clause "New" or "Revised" License
201 stars 30 forks source link

Question: Function to get all routes #81

Closed jaybeemind closed 3 years ago

jaybeemind commented 3 years ago

Does FlowRouter have a function that returns all routes? Use case is for setting roles/permission per route name in admin panel.

Thanks in advance.

dr-dimitru commented 3 years ago

FlowRouter is singleton and it should be storing all routes map, just expose FlowRouter and console.log it. It isn't part of official JS API, so please, after finding an answer — update this thread with solution, perhaps someone else was looking for routes map

jaybeemind commented 3 years ago

Found it using this: console.log('Routes:', FlowRouter._routes). Thanks!