- edit MySkill

This commit is contained in:
Paolo Arena
2021-12-02 10:13:27 +01:00
parent 44e894c219
commit f6b737bcdb
2 changed files with 9 additions and 0 deletions

View File

@@ -334,11 +334,18 @@ router.post('/settable', authenticate, (req, res) => {
mydata.userId = req.user._id;
}
delete mydata['__v'];
delete mydata['__proto__'];
let mytablerec = new mytable(mydata);
// console.log('mytablerec', mytablerec);
const mytablestrutt = getTableByTableName(params.table);
if (mydata['_id'] !== undefined && mydata['_id'] !== 0) {
mytablerec.isNew = false;
}
return mytablerec.save().then(rec => {
// tools.mylog('rec', rec);
return res.send(rec);