diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-04-30 11:13:38 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-04-30 11:13:38 -0400 |
| commit | 4ea1b6aa4dc9b46ee19bdc168dae513da0be4e0e (patch) | |
| tree | 0416e0850156fd7199f5d9ef20753a195b91832d /packages/backend/src/core | |
| parent | fix type error in timeline.vue (diff) | |
| download | sharkey-4ea1b6aa4dc9b46ee19bdc168dae513da0be4e0e.tar.gz sharkey-4ea1b6aa4dc9b46ee19bdc168dae513da0be4e0e.tar.bz2 sharkey-4ea1b6aa4dc9b46ee19bdc168dae513da0be4e0e.zip | |
fix type errors in SponsorsService.ts
Diffstat (limited to 'packages/backend/src/core')
| -rw-r--r-- | packages/backend/src/core/SponsorsService.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/core/SponsorsService.ts b/packages/backend/src/core/SponsorsService.ts index 020c4ab3c6..3769378f5a 100644 --- a/packages/backend/src/core/SponsorsService.ts +++ b/packages/backend/src/core/SponsorsService.ts @@ -63,7 +63,7 @@ export class SponsorsService implements OnApplicationShutdown { } try { - const backers: Sponsor[] = await fetch(`${this.meta.donationUrl}/members/users.json`).then((response) => response.json()); + const backers = await fetch(`${this.meta.donationUrl}/members/users.json`).then((response) => response.json() as Promise<Sponsor[]>); // Merge both together into one array and make sure it only has Active subscriptions const allSponsors = [...backers].filter(sponsor => sponsor.isActive && sponsor.role === 'BACKER' && sponsor.tier); @@ -78,8 +78,8 @@ export class SponsorsService implements OnApplicationShutdown { @bindThis private async fetchSharkeySponsors(): Promise<Sponsor[]> { try { - const backers: Sponsor[] = await fetch('https://opencollective.com/sharkey/tiers/backer/all.json').then((response) => response.json()); - const sponsorsOC: Sponsor[] = await fetch('https://opencollective.com/sharkey/tiers/sponsor/all.json').then((response) => response.json()); + const backers = await fetch('https://opencollective.com/sharkey/tiers/backer/all.json').then((response) => response.json() as Promise<Sponsor[]>); + const sponsorsOC = await fetch('https://opencollective.com/sharkey/tiers/sponsor/all.json').then((response) => response.json() as Promise<Sponsor[]>); // Merge both together into one array and make sure it only has Active subscriptions const allSponsors = [...sponsorsOC, ...backers].filter(sponsor => sponsor.isActive); |