- add: createPushSubscription :

'Subscribed to FreePlanet.app!',
  'You can now receive Notification and Messages.'
This commit is contained in:
Paolo Arena
2019-02-05 18:17:44 +01:00
parent 8e5e7addb7
commit db2a460594
11 changed files with 38 additions and 42 deletions

View File

@@ -4,6 +4,8 @@ const Schema = mongoose.Schema;
mongoose.Promise = global.Promise;
mongoose.level = "F";
const { ObjectID } = require('mongodb');
// Resolving error Unknown modifier: $pushAll
mongoose.plugin(schema => {
schema.options.usePushEach = true
@@ -13,6 +15,7 @@ mongoose.plugin(schema => {
const SubscriberSchema = new Schema({
endpoint: String,
keys: Schema.Types.Mixed,
userId: String,
createDate: {
type: Date,
default: Date.now