Coop
Coop
Explore posts from servers
SSolidJS
Created by Coop on 5/26/2024 in #support
Vercel deployment broken
No description
11 replies
SSolidJS
Created by Coop on 5/25/2024 in #support
Layout Help
How do it so a navbar will show up on / /about /help but not on any [404] pages
5 replies
TtRPC
Created by Coop on 9/15/2023 in #❓-help
Forced router input?
I have a user route which has routes like get, delete, create etc. Some of the routes I require extra data but in all of them, my input contains:
id: z.string()
id: z.string()
I also call this code in all my routes:
const user = await db.query.users.findFirst({
where: eq(users.id, input.id),
})
const user = await db.query.users.findFirst({
where: eq(users.id, input.id),
})
Is there a way to create a wrapper or middleware that implements route logic like .input() but allows for other routes?
5 replies