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 stationList = Array.from(stationMap.values());
|
||||||
const confirmedStations = stations.filter((s) => s.confirmed);
|
const confirmedStations = stationList.filter((s) => s.confirmed);
|
||||||
const totalPoints = confirmedStations.reduce((sum, s) => sum + s.points, 0);
|
const totalPoints = confirmedStations.reduce((sum, s) => sum + s.points, 0);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -313,8 +313,8 @@ async function getPointsAwardEntityBreakdown(userId, rules) {
|
|||||||
name: 'Special Stations Award',
|
name: 'Special Stations Award',
|
||||||
description: 'Contact special stations to earn points',
|
description: 'Contact special stations to earn points',
|
||||||
},
|
},
|
||||||
entities: stations,
|
entities: stationList,
|
||||||
total: stations.length,
|
total: stationList.length,
|
||||||
confirmed: confirmedStations.length,
|
confirmed: confirmedStations.length,
|
||||||
totalPoints,
|
totalPoints,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user