Skip to content

Commit f14ddec

Browse files
committed
updated_at -> cached_at
1 parent d001942 commit f14ddec

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

src/lib/api/models/LeaderboardDumpResponse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
import type { LeaderboardEntryResponse } from "./LeaderboardEntryResponse"
66
export type LeaderboardDumpResponse = {
77
count: number
8-
updated_at: string
8+
cached_at: string
99
entries: Array<LeaderboardEntryResponse>
1010
}

src/lib/api/models/MatchResponse.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { Leaderboard } from "./Leaderboard"
66
import type { MatchParticipantResponse } from "./MatchParticipantResponse"
77
import type { MatchState } from "./MatchState"
88
export type MatchResponse = {
9+
cached_at: string
910
match_id: string
1011
state?: MatchState | null
1112
leaderboard: Leaderboard

src/lib/api/models/PlayerActivityStats.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { PlayerActivityStatsRace } from "./PlayerActivityStatsRace"
66
import type { PlayerStatsEntry } from "./PlayerStatsEntry"
77
import type { PlayerStatsEntryAggregated } from "./PlayerStatsEntryAggregated"
88
export type PlayerActivityStats = {
9-
updated_at: string
9+
cached_at: string
1010
aggregated?: PlayerStatsEntryAggregated | null
1111
history: Array<PlayerStatsEntry>
1212
races: Array<PlayerActivityStatsRace>

src/lib/api/models/StatsByTime.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import type { StatsByTimeEntry } from "./StatsByTimeEntry"
66
import type { StatsByTimeMatchLength } from "./StatsByTimeMatchLength"
77
export type StatsByTime = {
8+
cached_at: string
89
updated_at: string
910
period: string
1011
count: number

src/pages/stats.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Timeago from "../components/Timeago.astro"
1111
import { LeagueDropdown } from "../components/widgets/LeagueDropdown"
1212
1313
const league = new URLSearchParams(Astro.url.search).get("league")
14-
const { races, updated_at } = await StatisticsApi.getStatistics({ league })
14+
const { races, cached_at } = await StatisticsApi.getStatistics({ league })
1515
const durationLabels = ["0-300", "301-600", "601-900", "901-1200", "1201+"]
1616
const durationPrettyLabels = ["0-5m", "5-10m", "10-15m", "15-20m", "20m+"]
1717
@@ -72,7 +72,7 @@ const factions = [
7272
<h1 class="flex-auto text-2xl font-bold text-white">Statistics</h1>
7373
</div>
7474
<p class="text-xs text-gray-500">
75-
Last updated <Timeago date={new Date(updated_at)} />
75+
Last updated <Timeago date={new Date(cached_at)} />
7676
</p>
7777
</div>
7878
</div>

0 commit comments

Comments
 (0)