square-airline-72035
05/27/2024, 4:23 AMfresh-fireman-491
05/27/2024, 4:35 AMsquare-airline-72035
05/27/2024, 7:44 PMsquare-airline-72035
05/27/2024, 7:46 PMsquare-airline-72035
05/27/2024, 8:01 PMsquare-airline-72035
05/27/2024, 8:03 PMfresh-fireman-491
05/28/2024, 6:43 PM.then
method. Lets try with some better error handling with a try/catch block and with a correct condition so it sets existingUse
to 1 if the user exist and else 0
javascript
const userNom = user.nom;
try {
const records = await CuentasTable.findRecords({
filter: {
username: userNom
}
});
const existingUser = records.length > 0 ? 1 : 0;
workflow.existingUser = existingUser;
} catch (error) {
console.error("Error fetching records:", error);
workflow.existingUser = 0;
}
fresh-fireman-491
05/28/2024, 6:44 PMsquare-airline-72035
05/29/2024, 12:08 AM