From 3377383d2860c02f6ce59cc94500ccc27f858511 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 15 Apr 2024 17:42:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AF=E4=BB=B6=E5=8C=85=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=A3=80=E6=9F=A5=E7=89=88=E6=9C=AC=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/cm/software.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/features/cm/software.go b/features/cm/software.go index 98b8fe79..80204d2f 100644 --- a/features/cm/software.go +++ b/features/cm/software.go @@ -217,7 +217,10 @@ func UploadSoftwareMultiFile(w http.ResponseWriter, r *http.Request) { sql := fmt.Sprintf("select * from ne_software where ne_type='%s' and version='%s'", neTypeUpper, version) neSoftwareInfo, _ := dborm.XormGetDataBySQL(sql) if len(*neSoftwareInfo) >= 1 { - services.ResponseInternalServerError500ProcessError(w, fmt.Errorf("ne_software version has exits")) + services.ResponseWithJson(w, 200, map[string]any{ + "code": 0, + "msg": "Software version already exists", + }) return }