upd: change sorting of supporters

This commit is contained in:
Marie 2024-09-16 19:02:06 +02:00
parent 2e18359dad
commit 62a81bed9b
No known key found for this signature in database
GPG Key ID: 7ADF6C9CD9A28555

View File

@ -41,7 +41,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const sponsorsOC = await fetch('https://opencollective.com/sharkey/tiers/sponsor/all.json').then((response) => response.json()); const sponsorsOC = await fetch('https://opencollective.com/sharkey/tiers/sponsor/all.json').then((response) => response.json());
// Merge both together into one array and make sure it only has Active subscriptions // Merge both together into one array and make sure it only has Active subscriptions
const allSponsors = [...backers, ...sponsorsOC].filter(sponsor => sponsor.isActive === true); const allSponsors = [...sponsorsOC, ...backers].filter(sponsor => sponsor.isActive === true);
// Remove possible duplicates // Remove possible duplicates
totalSponsors = [...new Map(allSponsors.map(v => [v.profile, v])).values()]; totalSponsors = [...new Map(allSponsors.map(v => [v.profile, v])).values()];