kstulgys
kstulgys
Explore posts from servers
TtRPC
Created by kstulgys on 10/20/2023 in #❓-help
Why webhooks does not work with TRPC?
I have a what suppose to be a webhook:
deposit: publicProcedure.input(z.any()).mutation(async ({ ctx, input }) => {
console.log(input);
return { input };
}),
deposit: publicProcedure.input(z.any()).mutation(async ({ ctx, input }) => {
console.log(input);
return { input };
}),
When I POST to this endpoint it responds with:
{
"result": {
"data": {
"json": {
"input": null
},
"meta": {
"values": {
"input": [
"undefined"
]
}
}
}
}
}
{
"result": {
"data": {
"json": {
"input": null
},
"meta": {
"values": {
"input": [
"undefined"
]
}
}
}
}
}
Why? console logs undefined on the server.
10 replies