server/handlers/admin.go
@@ -196,6 +196,7 @@ Cover string `json:"cover"` Description string `json:"description"` FileURL string `json:"file_url"` LaunchExe string `json:"launch_exe"` } if err := c.ShouldBindJSON(&req); err != nil || strings.TrimSpace(req.Name) == "" { c.JSON(http.StatusOK, gin.H{"code": 1, "msg": "请填写工具名称"}) @@ -215,6 +216,7 @@ tool.Cover = req.Cover tool.Description = req.Description tool.FileURL = req.FileURL tool.LaunchExe = req.LaunchExe if req.ID > 0 { config.DB.Save(&tool) } else {