diff options
Diffstat (limited to 'src/routes')
-rw-r--r-- | src/routes/election.svelte | 6 | ||||
-rw-r--r-- | src/routes/leaderboards/[name].svelte | 2 | ||||
-rw-r--r-- | src/routes/player/[player]/index.svelte | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/routes/election.svelte b/src/routes/election.svelte index a0c78ce..8504622 100644 --- a/src/routes/election.svelte +++ b/src/routes/election.svelte @@ -52,7 +52,7 @@ // don't invalidate the first time the function is called if (!first) await invalidate('') - const lastUpdatedAgo = Date.now() - data.last_updated * 1000 + const lastUpdatedAgo = Date.now() - data.lastUpdated * 1000 autoInvalidateTimeout = setTimeout(() => autoInvalidate(false), lastUpdatedAgo + 10 * 60 * 1000) } @@ -76,14 +76,14 @@ <div class="next-mayor-update"> <p> <b>Last API update:</b> - {millisecondsToTime(currentTime - data.last_updated * 1000, { + {millisecondsToTime(currentTime - data.lastUpdated * 1000, { smallestUnit: 1, parts: 1, })} ago </p> <p> <b>Next API update:</b> - {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.last_updated * 1000), { + {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated * 1000), { smallestUnit: 1, parts: 1, })} diff --git a/src/routes/leaderboards/[name].svelte b/src/routes/leaderboards/[name].svelte index d4ef848..1c20b2c 100644 --- a/src/routes/leaderboards/[name].svelte +++ b/src/routes/leaderboards/[name].svelte @@ -3,7 +3,7 @@ import { API_URL } from '$lib/api' export const load: Load = async ({ params, fetch }) => { - const data = await fetch(`${API_URL}leaderboard/${params.name}`).then(r => r.json()) + const data = await fetch(`${API_URL}leaderboards/${params.name}`).then(r => r.json()) if (data.list.length === 0) return { fallthrough: true } as unknown diff --git a/src/routes/player/[player]/index.svelte b/src/routes/player/[player]/index.svelte index 70ea2ff..7148f20 100644 --- a/src/routes/player/[player]/index.svelte +++ b/src/routes/player/[player]/index.svelte @@ -45,9 +45,9 @@ for (const profile of data.profiles) { if (profile.members) for (const member of profile.members) { - if (member.uuid === data.player?.uuid && member.last_save > activeProfileLastSave) { + if (member.uuid === data.player?.uuid && member.lastSave > activeProfileLastSave) { activeProfile = profile - activeProfileLastSave = member.last_save + activeProfileLastSave = member.lastSave } } } |