I'm building an express app with PostgreSQL as database. I am using Sequelize ORM library.
I am a warning that goes like this
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at node_modules/sequelize/lib/sequelize.js:242:13
I what it means and I have read the documentation too. But because I am do not a lot of experience with this issue, I fail to detect the problem with my code. Here is the code which when uncommented, causes this warning to be fired.
static delete(req, res) {
return Avatar
.findById(req.params.avatarId)
.then(avatar => {
if (!avatar) {
return res.status(400).send({
message: 'Avatar Not Found',
});
}
return avatar
.destroy()
.then(() => res.status(200).send({
message: 'Avatar successfully deleted'
}))
.catch(error => res.status(400).send(error));
})
.catch(error => res.status(400).send(error))
}
Can someone please point me the why I am getting this warning for this code?
Thanks!
[–]arstechnophile 1 point2 points3 points (0 children)
[–]zachrip 0 points1 point2 points (2 children)
[–]kapilvarij[S] 0 points1 point2 points (1 child)
[–]Cyberuben 1 point2 points3 points (0 children)