- 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

@@ -6,6 +6,8 @@ require('../models/subscribers');
var Url = require('url-parse');
const { ObjectID } = require('mongodb');
const mongoose = require('mongoose');
const Subscription = mongoose.model('subscribers');
@@ -97,6 +99,14 @@ module.exports = {
return JSON.parse(JSON.stringify(src))
},
CloneRecordToNew(src) {
const myrec = Object.assign({}, src);
delete myrec._doc['_id'];
myrec._id = new ObjectID();
return myrec._doc
},
sendBackNotif: function (subscription, payload) {
console.log('sendBackNotif:', subscription, payload);