backend-manager 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -206,9 +206,10 @@ Module.prototype.getAllNotifications = function () {
206
206
  const self = this;
207
207
  return new Promise(async function(resolve, reject) {
208
208
  await self.libraries.admin.firestore().collection('notifications')
209
+ .count()
209
210
  .get()
210
- .then(function(querySnapshot) {
211
- return resolve(querySnapshot.size)
211
+ .then((snap) => {
212
+ return snap.data().count;
212
213
  })
213
214
  .catch(function(e) {
214
215
  return reject(e)