Refactored, renamed, and reorganized code

This commit is contained in:
David J. Allen 2023-09-19 13:55:46 -06:00
parent 589cc12962
commit b504550d98
7 changed files with 71 additions and 36 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)
}