Consuming external API with TRPC.

Hi so I have created this TRPC query that consumes an api from a node server:

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;
  }),
});



But it's not fetching anything, any idea what I might have missed?
Was this page helpful?