Files
freeplanet_serverside/server/router/api/actions.js
Paolo Arena 1a1348c563 - Load Events
- Edit Events
- When a field is updated: undate also memory list record

- Duplicate Event
2019-10-20 22:45:09 +02:00

28 lines
646 B
JavaScript

var mongoose = require('mongoose');
const Subscription = mongoose.model('subscribers');
module.exports = {
doOtherThingsAfterDeleted: function (tablename, rec) {
try {
if (tablename === 'users') {
// Delete also all the subscribers record of this User
return Subscription.remove({ userId: rec._id })
}
} catch (e) {
return false
}
return true;
},
doOtherThingsAfterDuplicated: function (tablename, rec) {
try {
if (tablename === 'users') {
// Delete also all the subscribers record of this User
}
} catch (e) {
return false
}
return true;
}
};