From f6e87d0f399cfac4990deb23d5d200409c3b18fa Mon Sep 17 00:00:00 2001 From: DokiDoki1103 <1666888816@qq.com> Date: Thu, 5 Sep 2024 04:08:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=93=E5=B1=95=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BB=8Ebody=E4=B8=AD=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/controller/search.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/controller/search.go b/internal/controller/search.go index 098abf2..5ffdae1 100644 --- a/internal/controller/search.go +++ b/internal/controller/search.go @@ -23,7 +23,6 @@ func Search(c *gin.Context) { c.JSON(http.StatusBadRequest, global.ErrorParam) return } - req.Extra = c.Query("extra") var result [][]string // 最后所有的答案的二维数组 var localAnswer [][]string // 本地答案 @@ -90,7 +89,7 @@ func Search(c *gin.Context) { resp := util.FillAnswerResponse(result, &req) if len(localAnswer) == 0 && c.Query("noRecord") == "" { // 只有本地题库没有答案或者明确标志不要记录 - middleware.CollectAnswer(resp, c.Query("courseName"), c.Query("extra")) + middleware.CollectAnswer(resp, req.CourseName, req.Extra) } c.JSON(http.StatusOK, resp) }