Hello
I created an http request in Moralis cloud functions. This request is pulling some data from an API. Data comes in piecemeal. I want to send the incoming data to the user at the end of the process. But it returns undefined . How can I solve this?
Is your teams
array getting all the data at each step? Or is logging the length showing what it should be when you go to return it?
@zfiratselim, you have to returns something in that function, I donβt see any return in that code.
I return teams array. But it is not return client. Can you help me?
You still need to return in the cloud function, not just in getTeams. Try just returning anything like a static value to test. And then make sure teams
has the right data you want.
also, you can add a return before Moralis.Cloud.httpRequest
Try add return in the points as mentioned above
You can then make a little fix here
getTeams(URL)
You can make it
const result = await getTeams(URL);
return result;
1 Like