tRPCttRPC
Powered by
IsaacI
tRPC•4y ago•
2 replies
Isaac

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
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

is trpc routes public ?
Answer OverflowAAnswer Overflow / ❓-help
3y ago
Private API, public clients
jgouxJjgoux / ❓-help
3y ago
Public and Private procedures Not working with Clerk and Prisma
BurhanBBurhan / ❓-help
2y ago