Don't double-stringify fcm payloads
This commit is contained in:
parent
8967818fcc
commit
d350f6be9a
@ -276,13 +276,13 @@ export async function sendPushNotification(
|
|||||||
body: string,
|
body: string,
|
||||||
token?: string,
|
token?: string,
|
||||||
) {
|
) {
|
||||||
const message = JSON.stringify({
|
const message = {
|
||||||
notification: {
|
notification: {
|
||||||
body,
|
body,
|
||||||
title,
|
title,
|
||||||
},
|
},
|
||||||
token,
|
token,
|
||||||
});
|
};
|
||||||
|
|
||||||
const notifResp = await fetch(
|
const notifResp = await fetch(
|
||||||
"https://fcm.googleapis.com/v1/projects/car-crushers-mobile/messages:send",
|
"https://fcm.googleapis.com/v1/projects/car-crushers-mobile/messages:send",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user