The function below worked but has broken without changes
exports.updateFormState = async() => {
let queryReply;
try {
queryReply = await db.sequelize.query(
"SELECT * FROM stackoverflow"
);
console.log("Im passed the reply")
console.log("This is the query: " + queryReply)
if (queryReply[1] === 1) {
console.log("Inside if statement")
return "SUCCESS";
}
}catch(err) {
return err.message;
}
}
What it should do
It needs to fire the query to the database and return the results.
What it does
It returns ,[object Object] The weird thing is that it always returned the right thing but now it doesn't
Things that work
The query works (Not shown in code) The database connection is there It worked before...
console.log("This is the query: " + queryReply)toconsole.log("This is the query: " , queryReply)