add contest rank.
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
|
||||
function filterResult(result: Problem) {
|
||||
const newResult = {
|
||||
id: result.id,
|
||||
_id: result._id,
|
||||
title: result.title,
|
||||
difficulty: DIFFICULTY[result.difficulty],
|
||||
@@ -131,3 +132,15 @@ export async function getContestProblems(contestID: string) {
|
||||
})
|
||||
return res.data.map(filterResult)
|
||||
}
|
||||
|
||||
export function getContestRank(
|
||||
contestID: string,
|
||||
query: { limit: number; offset: number }
|
||||
) {
|
||||
return http.get("contest_rank", {
|
||||
params: {
|
||||
contest_id: contestID,
|
||||
...query,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user