i want to update a record of my model in DB
update: async function (req, res, next) {
await Place.update({'id':1})
.set({
title: req.param('title'),
})
.fetch()
.then(function place_updated(updated_place){
res.json({'status':true, 'result':updated_place});
})
.catch(function(err) {
if (err) {
return res.json({'status': false, 'errors': err.Errors});
}
});
},
I'm sure that there is a record with the ID 1 in the database
But i get message Not Found !!!
please help me
thank you