Changing the scannedAt time in the original result (#823)

This commit is contained in:
Chandrapal Badshah
2019-06-12 04:25:29 +05:30
committed by Kota Kanbe
parent 269095d034
commit fcc2c1e4c7

View File

@@ -84,6 +84,7 @@ func (h VulsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
scannedAt := result.ScannedAt
if scannedAt.IsZero() {
scannedAt = time.Now().Truncate(1 * time.Hour)
result.ScannedAt = scannedAt
}
dir, err := scan.EnsureResultDir(scannedAt)
if err != nil {