Skip to content

Commit

Permalink
Get JSON response when installing FCM
Browse files Browse the repository at this point in the history
  • Loading branch information
guiconti committed Jul 19, 2024
1 parent 0d27046 commit 6cfadd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "push-receiver-v2",
"version": "2.2.2",
"version": "2.2.3",
"description":
"A module to subscribe to GCM/FCM and receive notifications within a node process. v2 is compatible with the latest FCM registration endpoints.",
"main": "src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/fcm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function generateFirebaseFID() {
}

async function installFCM(config) {
const response = await fetch(
const responseJson = await fetch(
`${FIREBASE_INSTALLATION}projects/${
config.firebase.projectID
}/installations`,
Expand All @@ -41,8 +41,8 @@ async function installFCM(config) {
sdkVersion : 'w:0.6.4',
}),
}
);
return response;
).then(response => response.json());
return responseJson;
}

async function registerFCM(config) {
Expand Down

0 comments on commit 6cfadd5

Please sign in to comment.