Hello, I am currently writing a function to integrate the college score card api. I already added the api as a source in Data Connection and configured a webhook to take in a parameter “school_name” and return data about the corresponding schools. When I wrote a typescript function to make a call to the webhook, the webhook returned an undefined result.
Here is the function :
@Query()
public async getCollegeInfo(): Promise<string> {
try {
const response = await GetCollegeData.webhooks.FetchCollegeData.call({
school_name: "Harvard University"
});
console.log(response);
return JSON.stringify(response);
} catch (error) {
console.error("Error fetching college information:", error);
throw new Error("Failed to fetch college information");
}
}