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

interface LibraryTrackResponse {
  fileServer: string;
  task: Task;
  groupNumber: number;
  splitConfig: [];
}

/** 查看单个评卷任务的试卷轨迹 */
export async function getSingleLibraryTask(taskId: string) {
  const form = new FormData();
  taskId && form.append("taskId", taskId);
  return httpApp.post<LibraryTrackResponse>(
    "/api/admin/exam/track/library",
    form
  );
}

/** 查看单个*试评*评卷任务的试卷轨迹 */
export async function getSingleLibraryTaskTrial(taskId: string) {
  const form = new FormData();
  taskId && form.append("taskId", taskId);
  return httpApp.post<LibraryTrackResponse>(
    "/api/admin/exam/track/trialLibrary",
    form
  );
}
