Consuming external API with TRPC.
Hi so I have created this TRPC query that consumes an api from a node server:
But it's not fetching anything, any idea what I might have missed?
But it's not fetching anything, any idea what I might have missed?
export const leadsRouter = createTRPCRouter({
getAllLeads: privateProcedure.query(async () => {
const response = await axios.get(LEADS_BASE_URL + "api/leads/all");
console.log("response", response);
return response.data;
}),
});