Remove CRUD funcs of CveContents
This commit is contained in:
@@ -513,7 +513,7 @@ func fillCveDetail(r *models.ScanResult) error {
|
||||
}
|
||||
for _, con := range []models.CveContent{*nvd, *jvn} {
|
||||
if !con.Empty() {
|
||||
vinfo.CveContents.Upsert(con)
|
||||
vinfo.CveContents[con.Type] = con
|
||||
}
|
||||
}
|
||||
r.ScannedCves[cveID] = vinfo
|
||||
|
||||
@@ -239,7 +239,7 @@ func isCveInfoUpdated(cveID string, previous, current models.ScanResult) bool {
|
||||
for _, c := range previous.ScannedCves {
|
||||
if cveID == c.CveID {
|
||||
for _, cType := range cTypes {
|
||||
content, _ := c.CveContents.Get(cType)
|
||||
content, _ := c.CveContents[cType]
|
||||
prevLastModified[cType] = content.LastModified
|
||||
}
|
||||
break
|
||||
@@ -250,7 +250,7 @@ func isCveInfoUpdated(cveID string, previous, current models.ScanResult) bool {
|
||||
for _, c := range current.ScannedCves {
|
||||
if cveID == c.CveID {
|
||||
for _, cType := range cTypes {
|
||||
content, _ := c.CveContents.Get(cType)
|
||||
content, _ := c.CveContents[cType]
|
||||
curLastModified[cType] = content.LastModified
|
||||
}
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user