lint fehler behoben
This commit is contained in:
@@ -102,7 +102,7 @@ export function upsertPushToken(user, { token, platform = 'android', appVersion
|
||||
return user
|
||||
}
|
||||
|
||||
async function sendFcmMessage({ serviceAccount, accessToken, token, title, body, data = {} }) {
|
||||
async function sendFcmMessage({ serviceAccount, accessToken, token, data = {} }) {
|
||||
const projectId = projectIdFromServiceAccount(serviceAccount)
|
||||
if (!projectId) throw new Error('FCM project_id fehlt.')
|
||||
const response = await fetch(`https://fcm.googleapis.com/v1/projects/${projectId}/messages:send`, {
|
||||
@@ -185,7 +185,7 @@ export async function sendPushToUsers({ title, body, data = {}, predicate, bodyF
|
||||
const validTokens = []
|
||||
for (const entry of tokens) {
|
||||
try {
|
||||
await sendFcmMessage({ serviceAccount, accessToken, token: entry.token, title, body: userBody, data: payload })
|
||||
await sendFcmMessage({ serviceAccount, accessToken, token: entry.token, data: payload })
|
||||
sent += 1
|
||||
validTokens.push(entry)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user