mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	upd: fix broken returns and change if statement
This commit is contained in:
		
							parent
							
								
									9dd51bc9eb
								
							
						
					
					
						commit
						f08ef28d54
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -50,9 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
			
		|||
			
 | 
			
		||||
			if (ps.instance) {
 | 
			
		||||
				const meta = await this.metaService.fetch();
 | 
			
		||||
				if (meta.donationUrl && !meta.donationUrl.includes('opencollective.com')) {
 | 
			
		||||
					return [];
 | 
			
		||||
				} else if (meta.donationUrl) {
 | 
			
		||||
				if (meta.donationUrl && meta.donationUrl.includes('opencollective.com')) {
 | 
			
		||||
					return { sponsor_data: await maybeCached('instanceSponsors', ps.forceUpdate, async () => {
 | 
			
		||||
						let totalSponsors;
 | 
			
		||||
						const meta = await this.metaService.fetch();
 | 
			
		||||
| 
						 | 
				
			
			@ -73,7 +71,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
			
		|||
						}
 | 
			
		||||
					}) };
 | 
			
		||||
				} else {
 | 
			
		||||
					return [];
 | 
			
		||||
					return { sponsor_data: [] };
 | 
			
		||||
				}
 | 
			
		||||
			} else {
 | 
			
		||||
				return { sponsor_data: await maybeCached('sponsors', ps.forceUpdate, async () => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue