mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-23 17:41:50 +01:00
Fix outdated vulnerability database check
This commit is contained in:
@@ -100,7 +100,7 @@ class OdcDbService @Inject()(@NamedDatabase("odc") protected val dbConfigProvide
|
|||||||
|
|
||||||
private def loadUpdateProperties(): Future[Map[String, Long]] = db.run(properties.filter(_.id like "NVD CVE%").result).map(_.map{case OdcProperty(id, value) => (id, value.toLong)}.toMap)
|
private def loadUpdateProperties(): Future[Map[String, Long]] = db.run(properties.filter(_.id like "NVD CVE%").result).map(_.map{case OdcProperty(id, value) => (id, value.toLong)}.toMap)
|
||||||
|
|
||||||
def loadLastDbUpdate(): Future[DateTime] = loadUpdateProperties().map(vals => new DateTime(vals.values.max)) // TODO: timezone (I don't care much, though)
|
def loadLastDbUpdate(): Future[DateTime] = loadUpdateProperties().map { vals => new DateTime(vals.values.max*1000) } // TODO: timezone (I don't care much, though)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user