From 5bb65f7d42b35666a132115275dd1fff8b1591c3 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Mon, 24 Mar 2025 13:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/func_model.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/handler/func_model.go b/handler/func_model.go index 0acbdc5..616c9e6 100644 --- a/handler/func_model.go +++ b/handler/func_model.go @@ -53,15 +53,13 @@ func FindFuncModel(c *gin.Context) { return } c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": funcModels}) - } else if req.ModelID != 0 { + } else { funcModels, err3 := service.FindFuncModelByUserID(userID) if err3 != nil { c.JSON(http.StatusOK, gin.H{"error": err3.Error(), "code": proto.FuncModelSearchFailed, "message": "failed"}) return } c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": funcModels}) - } else { - c.JSON(http.StatusOK, gin.H{"error": "type error", "code": proto.FuncModelSearchFailed, "message": "failed"}) } } else { c.JSON(http.StatusOK, gin.H{"error": err.Error(), "code": proto.ParameterError, "message": "failed"})