Skip to content

Commit

Permalink
Migrated usage of _ensureIndex to createIndex and Firebase libraries …
Browse files Browse the repository at this point in the history
…updates
  • Loading branch information
paulincai committed Oct 9, 2021
1 parent aa19931 commit 582ccc3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/server/internalMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Push } from './pushToDB'
import { Meteor } from 'meteor/meteor'

Push.appCollection = new Mongo.Collection('_push_app_tokens')
Push.appCollection._ensureIndex({ userId: 1 })
Push.appCollection.createIndex({ userId: 1 })

const matchToken = Match.OneOf({ web: String }, { android: String }, { apn: String }, { ios: String })

Expand Down
10 changes: 5 additions & 5 deletions lib/server/pushToDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ function EventState () {}
const Push = new EventState()

Push.notifications = new Mongo.Collection('_push_notifications')
Push.notifications._ensureIndex({ createdAt: 1 })
Push.notifications._ensureIndex({ sent: 1 })
Push.notifications._ensureIndex({ sending: 1 })
Push.notifications._ensureIndex({ delayUntil: 1 })
Push.notifications._ensureIndex({ userId: 1 })
Push.notifications.createIndex({ createdAt: 1 })
Push.notifications.createIndex({ sent: 1 })
Push.notifications.createIndex({ sending: 1 })
Push.notifications.createIndex({ delayUntil: 1 })
Push.notifications.createIndex({ userId: 1 })

const validateDocument = notification => {
const matchToken = Match.OneOf({ apn: String }, { android: String }, { web: String })
Expand Down
6 changes: 3 additions & 3 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* globals Package, Npm, Cordova */
Package.describe({
name: 'activitree:push',
version: '2.0.10',
version: '2.0.11',
summary: 'Push Notifications for Cordova and Web/PWA with Firebase (FCM).',
git: 'https://github.com/activitree/meteor-push.git'
})

Npm.depends({
'firebase-admin': '9.11.0',
firebase: '8.8.1',
'firebase-admin': '9.12.0',
firebase: '9.1.2',
events: '3.3.0'
})

Expand Down

0 comments on commit 582ccc3

Please sign in to comment.