7911aculton
7911aculton
NNuxt
Created by 7911aculton on 6/10/2024 in #❓・help
Filter routes returned by useRouter().getRoutes()
Hey, useRouter().getRoutes() seems to always return all routes. My goal is to not expose the existence of routes to clients that do not have access to these routes (e.g. admin routes). Of course I could .filter() the routes, but it would still be possible to get the unfiltered array, if one wanted to. Is there any way to achieve this?
4 replies