@ccci/micro-server 1.0.117 → 1.0.118

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -250967,12 +250967,15 @@ class PushNotifier {
250967
250967
  }
250968
250968
  static async sendNotifications(tokens, message, metadata = {}, options) {
250969
250969
  try {
250970
- let params = {
250971
- tokens,
250972
- notification: message,
250973
- data: metadata
250974
- };
250975
- let result = await PushNotifier.FirebaseAdmin.messaging().sendEachForMulticast(params);
250970
+ let params = [];
250971
+ tokens.forEach((token) => {
250972
+ params.push({
250973
+ token,
250974
+ notification: message,
250975
+ data: metadata
250976
+ });
250977
+ });
250978
+ let result = await PushNotifier.FirebaseAdmin.messaging().sendEach(params);
250976
250979
  return result;
250977
250980
  } catch (error) {
250978
250981
  console.log("error :>> ", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",