From 90f4b2c916cdd7f61843c7a2c7f4451d44e18367 Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Fri, 17 Jun 2022 14:55:34 -0500
Subject: Fix being ratelimited sometimes

---
 src/lib/sections/Leaderboards.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib/sections/Leaderboards.svelte')

diff --git a/src/lib/sections/Leaderboards.svelte b/src/lib/sections/Leaderboards.svelte
index 7e32958..817f59a 100644
--- a/src/lib/sections/Leaderboards.svelte
+++ b/src/lib/sections/Leaderboards.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { API_URL } from '$lib/api'
+	import { fetchApi } from '$lib/api'
 
 	import type { CleanMemberProfile } from '$lib/APITypes'
 	import Emoji from '$lib/Emoji.svelte'
@@ -8,7 +8,7 @@
 	export let data: CleanMemberProfile
 </script>
 
-{#await fetch(`${API_URL}player/${data.member.uuid}/${data.profile.uuid}/leaderboards`).then( r => r.json() )}
+{#await fetchApi(`player/${data.member.uuid}/${data.profile.uuid}/leaderboards`, fetch).then( r => r.json() )}
 	Loading...
 {:then leaderboards}
 	{#if leaderboards.length > 0}
-- 
cgit 

