添加对题目的评论
This commit is contained in:
@@ -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 } })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user