Ok - thanks for letting me know. I’m reviewing the articles you sent and will revise the code to something more like:
results = await wixData.query(SITMEMBERS_TABLE)
.eq(EMAIL_ARG, username)
.include(MEMBERDEVICES_FIELD)
.find(options);
if (results.items.length === 0 ) {
//console.log("Did not find member with email: " + username);
response.body = {[RESULT_KEY]: false, [ERRORMSG_KEY]:USER_ERROR_USER_NOT_FOUND};
return ok(response);
}
SITMember = results.items[0];
OTHER CODE GOES HERE
That’s more like what you would expect, correct?