2
0
Эх сурвалжийг харах

提交时去除前端添加的字段

Michael Wang 3 жил өмнө
parent
commit
877a612dd0

+ 5 - 0
src/api/inspectPage.ts

@@ -118,6 +118,11 @@ export async function rejectInspectedTask(
   studentId: string,
   questionList: Array<Question>
 ) {
+  questionList = JSON.parse(
+    JSON.stringify(questionList, (key, value) =>
+      !key.startsWith("__") ? value : undefined
+    )
+  );
   return httpApp.post("/admin/exam/inspected/rejected", {
     studentId,
     questionList,

+ 5 - 0
src/api/libraryInspectPage.ts

@@ -54,6 +54,11 @@ export async function rejectInspectedTask(
   libraryId: string,
   questionList: Array<Question>
 ) {
+  questionList = JSON.parse(
+    JSON.stringify(questionList, (key, value) =>
+      !key.startsWith("__") ? value : undefined
+    )
+  );
   return httpApp.post("/admin/exam/library/rejected", {
     libraryId,
     questionList,