fix: 软件包上传检查版本提示存在信息

This commit is contained in:
TsMask
2024-04-15 17:42:42 +08:00
parent eea8b803ac
commit 3377383d28

View File

@@ -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
}