import { http } from '@/http/http'

enum Api {
  base = '/examAnswerResult/result',
  list = '/examAnswerResult/result/list',
}

function addAnswerResult(params: any) {
  return http.post(Api.base, params)
}

async function getAnswerResult(examId: number) {
  return http.get(`${Api.base}/${examId}`)
}

async function getAnswerResultList(params: any) {
  return http.get(`${Api.list}`, params)
}

async function gradeExam(params: any) {
  return http.post(`${Api.base}/grade`, params)
}

export { addAnswerResult, getAnswerResult, getAnswerResultList, gradeExam }
