Fix variable name conflict in getPointsAwardEntityBreakdown

Rename 'stations' variable to 'stationList' to avoid conflict with
destructured 'stations' from rules.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-16 09:42:10 +01:00
parent a1886a94c8
commit ac79645477

View File

@@ -303,8 +303,8 @@ async function getPointsAwardEntityBreakdown(userId, rules) {
}
}
const stations = Array.from(stationMap.values());
const confirmedStations = stations.filter((s) => s.confirmed);
const stationList = Array.from(stationMap.values());
const confirmedStations = stationList.filter((s) => s.confirmed);
const totalPoints = confirmedStations.reduce((sum, s) => sum + s.points, 0);
return {
@@ -313,8 +313,8 @@ async function getPointsAwardEntityBreakdown(userId, rules) {
name: 'Special Stations Award',
description: 'Contact special stations to earn points',
},
entities: stations,
total: stations.length,
entities: stationList,
total: stationList.length,
confirmed: confirmedStations.length,
totalPoints,
};