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:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user