sun-pc-linux 7 months ago
parent
commit
ff342fab61
2 changed files with 10 additions and 14 deletions
  1. 10 2
      src/api/api.http
  2. 0 12
      src/db/model/examHistory.go

+ 10 - 2
src/api/api.http

@@ -26,9 +26,17 @@ POST http://{{host}}/exam/history/create HTTP/1.1
 Content-Type: application/json
 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjI4MjU4OTIsImlkIjoiNjQyYTUyNGY1ZjUwYmM5MDNmOTg2Mzk0Iiwia2V5IjoiYm94Y29zdCIsIm5hbWUiOiLlrZnog5wiLCJvcmlnX2lhdCI6MTcyMjIyMTA5MiwicGFyZW50IjoiNjQyYTUyNGY1ZjUwYmM5MDNmOTg2Mzk0IiwicGhvbmUiOiIxMzQwODU0NzgyMyIsInJvbGUiOiIiLCJzdGF0ZSI6MSwidXNlclR5cGUiOjJ9.Cz7qI3-Vah0io5ZLIFDyVOf8qsqdmbT8WHdprrjbdXw
 
+
 {
-    "userId": "xxxx",
-    "content": "客户端提交的历史记录json结构字符串"
+	"userId": "xxx",
+	"examRecord": [
+		{"titlexxxx1":"正确"},
+		{"titlexxxx2":"错误"}
+	],
+	"totalScore": 93.5,
+	"correct": 18,
+	"mistake": 2,
+	"createTime": "2023-05-16T01:57:52.017Z"
 }
 
 ###

+ 0 - 12
src/db/model/examHistory.go

@@ -16,15 +16,3 @@ type ExamHistory struct {
 	Mistake    int                 `bson:"userId" json:"mistake"`
 	CreateTime time.Time           `bson:"createTime" json:"createTime"`
 }
-
-// {
-// 	"userId": "xxx",
-// 	"examRecord": [
-// 		{"titlexxxx1":"正确"},
-// 		{"titlexxxx2":"错误"}
-// 	],
-// 	"totalScore": 93.5,
-// 	"correct": 18,
-// 	"mistake": 2,
-// 	"createTime": "2023-05-16T01:57:52.017Z"
-// }