Skip to content
Snippets Groups Projects

Fetch sponsors from OC

Merged Marie requested to merge upd/sponsor into develop
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -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());
// 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 = [...backers, ...sponsorsOC].filter(sponsor => sponsor.isActive === true);
// Remove possible duplicates
totalSponsors = [...new Map(allSponsors.map(v => [v.profile, v])).values()];
Loading