Don't double-stringify fcm payloads

This commit is contained in:
regalijan 2023-10-19 16:51:17 -04:00
parent 8967818fcc
commit d350f6be9a
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -276,13 +276,13 @@ export async function sendPushNotification(
body: string,
token?: string,
) {
const message = JSON.stringify({
const message = {
notification: {
body,
title,
},
token,
});
};
const notifResp = await fetch(
"https://fcm.googleapis.com/v1/projects/car-crushers-mobile/messages:send",