Hello,
I am trying to find a record from the DB and updating a column value but it is throwing error .
Code:
const Tokens = Moralis.Object.extend("tokens");
const query = new Moralis.Query(Tokens);
query.equalTo("address", address.toLowerCase());
query.find().then((obj) => {
obj.set("isNew", 0);
obj.save();
});
Error:
UnhandledPromiseRejectionWarning: TypeError: obj.set is not a function