fix(leaderboard): fix leaderboard scheme for questions and streaks
This commit is contained in:
@ -224,8 +224,15 @@ class ApiClient {
|
||||
return this.authenticatedRequest<Topic>(`/topics/${topicId}`, token);
|
||||
}
|
||||
|
||||
async fetchLeaderboard(token: string): Promise<Leaderboard> {
|
||||
return this.authenticatedRequest<Leaderboard>(`/leaderboard/`, token);
|
||||
async fetchLeaderboard(
|
||||
token: string,
|
||||
metric: string,
|
||||
timeframe: string,
|
||||
): Promise<Leaderboard> {
|
||||
return this.authenticatedRequest<Leaderboard>(
|
||||
`/leaderboard/?metric=${metric}&timeframe=${timeframe}`,
|
||||
token,
|
||||
);
|
||||
}
|
||||
|
||||
async fetchPredictedScore(token: string): Promise<PredictedScore> {
|
||||
|
||||
Reference in New Issue
Block a user