添加对题目的评论

This commit is contained in:
2024-07-01 13:10:43 +08:00
parent 238b1ff416
commit 922fc61ead
6 changed files with 258 additions and 2 deletions

View File

@@ -189,3 +189,22 @@ export function createMessage(data: {
export function getMessageList(offset = 0, limit = 10) {
return http.get("message", { params: { limit, offset } })
}
export function createComment(data: {
problem_id: number
description_rating: number
difficulty_rating: number
comprehensive_rating: number
content: string
submission_id?: string
}) {
return http.post("comment", data)
}
export function getComment(problemID: number) {
return http.get("comment", { params: { problem_id: problemID } })
}
export function getCommentStatistics(problemID: number) {
return http.get("comment/statistics", { params: { problem_id: problemID } })
}