- Enable Edit Event into dialog form ... (and save to the db)

- Add Where table
This commit is contained in:
Paolo Arena
2019-10-21 20:38:10 +02:00
parent 1a1348c563
commit 570bbf3744
7 changed files with 102 additions and 37 deletions

View File

@@ -2,7 +2,7 @@ var mongoose = require('mongoose');
const Subscription = mongoose.model('subscribers');
module.exports = {
doOtherThingsAfterDeleted: function (tablename, rec) {
doOtherThingsAfterDeleted: async function (tablename, rec) {
try {
if (tablename === 'users') {
// Delete also all the subscribers record of this User
@@ -13,12 +13,14 @@ module.exports = {
}
return true;
},
doOtherThingsAfterDuplicated: function (tablename, rec) {
doOtherThingsAfterDuplicated: async function (tablename, myrec, mynewrec) {
try {
if (tablename === 'users') {
// Delete also all the subscribers record of this User
}
return { myrec }
} catch (e) {
return false
}