Merge branch 'main' into update-firmware

This commit is contained in:
David Allen 2023-10-10 11:14:31 -06:00 committed by GitHub
commit 2c4cd02a5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 22 deletions

View file

@ -78,13 +78,13 @@ func DeleteProbeResults(path string, results *[]magellan.BMCProbeResult) error {
return nil
}
func GetProbeResults(path string) ([]magellan.BMCProbeResult, error) {
func GetProbeResults(path string) ([]magellan.ScannedResult, error) {
db, err := sqlx.Open("sqlite3", path)
if err != nil {
return nil, fmt.Errorf("could not open database: %v", err)
}
results := []magellan.BMCProbeResult{}
results := []magellan.ScannedResult{}
err = db.Select(&results, "SELECT * FROM magellan_scanned_ports ORDER BY host ASC, port ASC;")
if err != nil {
return nil, fmt.Errorf("could not retrieve probes: %v", err)