Added ability to store output of collect command

Signed-off-by: David J. Allen <davidallendj@gmail.com>
This commit is contained in:
David Allen 2023-09-18 16:45:15 -06:00
parent 589cc12962
commit 3b9f4e6070
10 changed files with 135 additions and 62 deletions

View file

@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/bikeshack/magellan/internal/api"
"github.com/bikeshack/magellan/internal/util"
"github.com/jmoiron/sqlx"
)
@ -43,7 +43,7 @@ func ScanForAssets() error {
func QueryScannedPorts() error {
// Perform scan and collect from dora server
url := makeEndpointUrl("/scanned_ports")
_, body, err := api.MakeRequest(url, "GET", nil, nil)
_, body, err := util.MakeRequest(url, "GET", nil, nil)
if err != nil {
return fmt.Errorf("could not discover assets: %v", err)
}