feat(leaderboard): add leaderboard functionaltiy
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import type { Leaderboard } from "../types/leaderboard";
|
||||
import type { Lesson, LessonsResponse } from "../types/lesson";
|
||||
import type {
|
||||
SessionAnswerResponse,
|
||||
@ -222,5 +223,9 @@ class ApiClient {
|
||||
async fetchTopicById(token: string, topicId: string): Promise<Topic> {
|
||||
return this.authenticatedRequest<Topic>(`/topics/${topicId}`, token);
|
||||
}
|
||||
|
||||
async fetchLeaderboard(token: string): Promise<Leaderboard> {
|
||||
return this.authenticatedRequest<Leaderboard>(`/leaderboard/`, token);
|
||||
}
|
||||
}
|
||||
export const api = new ApiClient(API_URL);
|
||||
|
||||
Reference in New Issue
Block a user