lint fehler behoben
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 10m21s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-08-12 12:03:29 +02:00
parent 9889430109
commit 0475e3084d
3 changed files with 17 additions and 20 deletions

View File

@@ -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) {