pass app config and db status by reference to the presenter

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman 2021-05-26 10:03:23 -04:00 committed by Alfredo Deza
parent d8aedf8117
commit b354ea9e2e

View file

@ -237,12 +237,11 @@ func startWorker(userInput string, failOnSeverity *vulnerability.Severity) <-cha
errs <- grypeerr.ErrAboveSeverityThreshold
}
if appConfig != nil && dbStatus != nil {
bus.Publish(partybus.Event{
Type: event.VulnerabilityScanningFinished,
Value: presenter.GetPresenter(presenterConfig, matches, packages, context, metadataProvider, *appConfig, *dbStatus),
})
}
bus.Publish(partybus.Event{
Type: event.VulnerabilityScanningFinished,
Value: presenter.GetPresenter(presenterConfig, matches, packages, context, metadataProvider, appConfig, dbStatus),
})
}()
return errs
}