I have this server-side action js code:
function(properties, context) {
// NOTE: all the necessary params.
params
let headers = {
'Content-Type': 'application/json'
}
paramsToSend = {
loginId: loginId,
password: password,
customerId: customerId,
startDate: startDate,
endDate: endDate,
resultsPerPage: resultsPerPage,
showExternal: showExternal
}
var options = {
method: 'GET',
uri: 'https://api.konnektive.com/order/query/',
headers: headers,
json: paramsToSend
}
var requestSent = context.request(options);
console.log(requestSent.statusCode);
if (requestSent.statusCode.toString().charAt(0) !== "2") {
return {
product_items: productItems
}
} else {
let retrievedData = requestSent.body.data
productItems.push
return {
product_items: retrievedData
}
}
}
I can’t see aywhere the console.log I printed when I try to inspect the page and look at the console.