feat(default): add real rankings data
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import { api } from '@/lib/api'
|
||||
import type { RankingPeriod, RankingsSnapshot } from './types'
|
||||
|
||||
type RankingsResponse = {
|
||||
success: boolean
|
||||
message?: string
|
||||
data: RankingsSnapshot
|
||||
}
|
||||
|
||||
export async function getRankings(
|
||||
period: RankingPeriod
|
||||
): Promise<RankingsResponse> {
|
||||
const res = await api.get('/api/rankings', { params: { period } })
|
||||
return res.data
|
||||
}
|
||||
Reference in New Issue
Block a user