The fault is clearly mine, but I am having trouble getting a response on an API call from a cloud function. I can’t even get an error logged in the console. . . My code is as follows, does anyone have any suggestions? Thanks very much!
Moralis.Cloud.define("getToolModifierItems", async (request) => {
const results = "";
Moralis.Cloud.httpRequest({
url: 'https://api.lunarcrush.com/v2?data=global&key=796rfpotk3eh4690c0zzlh'
}).then(function(httpResponse) {
// success
results = (httpResponse.text);
console.log(httpResponse.text);
},function(httpResponse) {
// error
console.error('Request failed with response code ' + httpResponse.status);
});
return results;
});