in server-examples/nodejs-backend/matches.js [74:92]
loadMatchData(contextId).then(function (result) {
// Returns a json with data and success:true if data was found
if (result) {
response.json({
'success': true,
'contextId': contextId,
'empty': false,
'data': result
});
// Returns a json with empty:true and success:true
// if all operations were successful, but no data was found
} else {
response.json({
'success': true,
'contextId': contextId,
'empty': true
});
}
})