Aktualisiere die Version auf 1.8.12, passe die Protokollnachricht für den QTTR-Import an und füge Tests für die QTTR-Importsignatur hinzu.
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 5m15s
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-09-30 09:30:24 +02:00
parent 835a31a72e
commit 87e08df93a
4 changed files with 33 additions and 4 deletions

View File

@@ -287,15 +287,21 @@ async function importAuthenticatedTtrValues(connection) {
})
await sendOwnTtrChangePush(changes)
if (previousQttrSignature && previousQttrSignature !== nextQttrSignature) {
await sendQttrListUpdatedPush({ importedAt, rowCount: rows.length })
await sendQttrListUpdatedPush({
importedAt,
rowCount: rows.filter(row => row.currentQttr != null).length
})
}
await saveMyTischtennisConnection({ ...connection, lastSuccessfulImportAt: importedAt, lastImportError: null })
return { outputFile: OUTPUT_FILE, tableCount: 1, ...payload }
}
function qttrListSignature(rows) {
export function qttrListSignature(rows) {
if (!Array.isArray(rows) || rows.length === 0) return ''
return rows
// TTR-only players are refreshed daily. They must neither alter the
// quarterly QTTR signature nor trigger a QTTR-list notification.
.filter(row => row?.currentQttr != null)
.map(row => [
String(row?.playerNumber || row?.playerName || '').trim().toLocaleLowerCase('de-DE'),
row?.currentQttr ?? ''