fix: 网元软件表结构变更接口调整

This commit is contained in:
TsMask
2024-05-07 18:39:20 +08:00
parent 7a1ce0faea
commit 1708b12bd1

View File

@@ -20,9 +20,9 @@ import (
) )
const ( const (
SoftwareStatusUploaded = "Uploaded" SoftwareStatusUploaded = "3"
SoftwareStatusInactive = "Inactive" SoftwareStatusInactive = "3"
SoftwareStatusActive = "Active" SoftwareStatusActive = "1"
DigestsSignOkString = "digests signatures OK" DigestsSignOkString = "digests signatures OK"
SoftwareVerifiedOk = "Verified OK" SoftwareVerifiedOk = "Verified OK"
) )
@@ -419,7 +419,7 @@ func DownloadSoftwareFile(w http.ResponseWriter, r *http.Request) {
return return
} }
fileName := (*neSoftware)[0]["file_name"] fileName := (*neSoftware)[0]["name"]
path := (*neSoftware)[0]["path"] path := (*neSoftware)[0]["path"]
md5Sum := (*neSoftware)[0]["md5_sum"] md5Sum := (*neSoftware)[0]["md5_sum"]
@@ -473,7 +473,7 @@ func DeleteSoftwareFile(w http.ResponseWriter, r *http.Request) {
return return
} }
fileName := (*neSoftware)[0]["file_name"] fileName := (*neSoftware)[0]["name"]
path := (*neSoftware)[0]["path"] path := (*neSoftware)[0]["path"]
filePath := fmt.Sprintf("%s/%s", path, fileName) filePath := fmt.Sprintf("%s/%s", path, fileName)
err = os.Remove(filePath) err = os.Remove(filePath)
@@ -560,7 +560,7 @@ func DistributeSoftwareToNF(w http.ResponseWriter, r *http.Request) {
return return
} }
fileName := (*neSoftware)[0]["file_name"] fileName := (*neSoftware)[0]["name"]
path := (*neSoftware)[0]["path"] path := (*neSoftware)[0]["path"]
srcFile := fmt.Sprintf("%s/%s", path, fileName) srcFile := fmt.Sprintf("%s/%s", path, fileName)