Isaac
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Isaac on 10/8/2024 in #questions
create-t3-turbo with --turbo flag
2 replies
How to divide public and private routes?
I am creating and app that has a dashboard panel for admin, and public routes, for users. Let's say that i have a resource called, "products", admins can add products y users get the details, right now i have something like
"products.get", this works fine for the users consumers, but now i want to create and endpoint to get more details (that are not exposed to the users), but i can't use the same path "products.get". So i was looking for some ideas to handle this case, maybe create a router "private", and add all the protected resources there? and another one public?. this will give me something like
"private.products.get" and "public.products.get"... but idk, maybe there is abetter option
3 replies