From 1708b12bd1a656d63ae9e3c5a81f105cd1097f49 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 7 May 2024 18:39:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E8=A1=A8=E7=BB=93=E6=9E=84=E5=8F=98=E6=9B=B4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/cm/software.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/features/cm/software.go b/features/cm/software.go index 19eacb36..2cb5f919 100644 --- a/features/cm/software.go +++ b/features/cm/software.go @@ -20,9 +20,9 @@ import ( ) const ( - SoftwareStatusUploaded = "Uploaded" - SoftwareStatusInactive = "Inactive" - SoftwareStatusActive = "Active" + SoftwareStatusUploaded = "3" + SoftwareStatusInactive = "3" + SoftwareStatusActive = "1" DigestsSignOkString = "digests signatures OK" SoftwareVerifiedOk = "Verified OK" ) @@ -419,7 +419,7 @@ func DownloadSoftwareFile(w http.ResponseWriter, r *http.Request) { return } - fileName := (*neSoftware)[0]["file_name"] + fileName := (*neSoftware)[0]["name"] path := (*neSoftware)[0]["path"] md5Sum := (*neSoftware)[0]["md5_sum"] @@ -473,7 +473,7 @@ func DeleteSoftwareFile(w http.ResponseWriter, r *http.Request) { return } - fileName := (*neSoftware)[0]["file_name"] + fileName := (*neSoftware)[0]["name"] path := (*neSoftware)[0]["path"] filePath := fmt.Sprintf("%s/%s", path, fileName) err = os.Remove(filePath) @@ -560,7 +560,7 @@ func DistributeSoftwareToNF(w http.ResponseWriter, r *http.Request) { return } - fileName := (*neSoftware)[0]["file_name"] + fileName := (*neSoftware)[0]["name"] path := (*neSoftware)[0]["path"] srcFile := fmt.Sprintf("%s/%s", path, fileName)