const addVotes = async (result) => {
console.log(result.target.id)
const Posts = Moralis.Object.extend("Posts");
const query = await new Moralis.Query(Posts);
query.equalTo("title", result.target.id);
console.log(query)
const x = await query.find()
const results = JSON.stringify(x)
const finalResults = JSON.parse(results)
console.log(finalResults)
finalResults[0].set("votes", votes++)
finalResults.save()
}
So right now this should work?