kumard3
kumard3
TtRPC
Created by kumard3 on 5/12/2023 in #❓-help
is it possible to use trpc on next js api routes
Thanks man 🙏
3 replies
TtRPC
Created by kumard3 on 5/10/2023 in #❓-help
how can i send a request to specific route in trpc server, after mutation ?
Yes it is inside a mutation , and after I get a success url from stripe
6 replies
TtRPC
Created by kumard3 on 5/10/2023 in #❓-help
how can i send a request to specific route in trpc server, after mutation ?
so i kind of did it , but can you tell me if it is good approach or not
if (session.success_url) {
const url = session.success_url;
const newUrl = url.replace(`/test/success`, '/api/contact');
await fetch(newUrl).then((res) => {
if (res.status === 200) {
console.log("Thank you for contacting us!");
} else {
console.log("Email/Password is invalid.");
}
})
.catch((e) => console.log(e));
}
if (session.success_url) {
const url = session.success_url;
const newUrl = url.replace(`/test/success`, '/api/contact');
await fetch(newUrl).then((res) => {
if (res.status === 200) {
console.log("Thank you for contacting us!");
} else {
console.log("Email/Password is invalid.");
}
})
.catch((e) => console.log(e));
}
6 replies
TtRPC
Created by kumard3 on 5/10/2023 in #❓-help
how can i send a request to specific route in trpc server, after mutation ?
Actually I am using stripe on trpc server , and after I get a success_url from it I wanted to send a request to /api/contact Just for follow up we can only add one url to success_url , given by stipe
6 replies
TtRPC
Created by Son on 11/7/2022 in #❓-help
cant access trpc endpoints via the browser
that is what i want , thank you man , one more question do you have any example of trpc-openapi prisma example ?😅
9 replies
TtRPC
Created by Son on 11/7/2022 in #❓-help
cant access trpc endpoints via the browser
So with this can i access my trpc endpoints on different webisite by making and api request?
9 replies