- Enable Edit Event into dialog form ... (and save to the db)
- Add Where table
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user