import { httpApp } from "@/plugins/axiosApp";
import { AdminPageSettingForImport, CommonResponse, Task } from "@/types";

export async function getInspectedSettingOfImportInspect(studentId?: string) {
  const form = new FormData();
  studentId && form.append("studentId", studentId);
  return httpApp.post<AdminPageSettingForImport>(
    "/admin/exam/inspected/import/getSetting",
    form
  );
}

/** 查看单个学生的复核任务 */
export async function getSingleInspectedTaskOfImportInspect(studentId: string) {
  const form = new FormData();
  studentId && form.append("studentId", studentId);
  return httpApp.post<Task>("/admin/exam/inspected/import/getTask", form);
}

/** 保存复核任务 */
export async function saveInspectedTaskOfImportInspect(
  studentId: string,
  isTag: string
) {
  const form = new FormData();
  form.append("studentId", studentId);
  form.append("isTag", isTag);
  return httpApp.post<CommonResponse>("/admin/exam/inspected/import/tag", form);
}
