diff --git a/bridge b/bridge index 45df21d..320d445 100755 Binary files a/bridge and b/bridge differ diff --git a/internal/app/bridge/app.go b/internal/app/bridge/app.go index 80aad07..4c7a2e8 100644 --- a/internal/app/bridge/app.go +++ b/internal/app/bridge/app.go @@ -3,7 +3,6 @@ package bridge import ( "context" "encoding/json" - "fmt" "log/slog" "sync" "time" @@ -97,7 +96,6 @@ func (a *BridgeApp) Run(ctx context.Context) { case msg := <-a.ChApi: switch msg.Method { case "POST": - fmt.Println("adding beacon to lookup", "mac", msg.MAC, "id", msg.ID) a.AppState.AddBeaconToLookup(msg.MAC, msg.ID) slog.Info("beacon added to lookup", "id", msg.ID) case "DELETE": diff --git a/internal/pkg/apiclient/data.go b/internal/pkg/apiclient/data.go index 2553afb..b3f0744 100644 --- a/internal/pkg/apiclient/data.go +++ b/internal/pkg/apiclient/data.go @@ -3,7 +3,6 @@ package apiclient import ( "encoding/json" "fmt" - "io" "net/http" "github.com/AFASystems/presence/internal/pkg/config" @@ -17,13 +16,6 @@ func GetTrackers(token string, client *http.Client, cfg *config.Config) ([]model return []model.Tracker{}, err } - bodyBytes, err := io.ReadAll(res.Body) - if err != nil { - fmt.Printf("error read body: %+v\n", err) - return []model.Tracker{}, err - } - fmt.Printf("body: %s\n", string(bodyBytes)) - var i []model.Tracker err = json.NewDecoder(res.Body).Decode(&i) if err != nil { diff --git a/internal/pkg/apiclient/updatedb.go b/internal/pkg/apiclient/updatedb.go index d1d38f0..3d69256 100644 --- a/internal/pkg/apiclient/updatedb.go +++ b/internal/pkg/apiclient/updatedb.go @@ -29,7 +29,6 @@ func UpdateDB(db *gorm.DB, ctx context.Context, cfg *config.Config, writer *kafk } if trackers, err := GetTrackers(token, client, cfg); err == nil { - fmt.Printf("trackers: %+v\n", trackers) syncTable(db, trackers) if err := controller.SendKafkaMessage(writer, &model.ApiUpdate{Method: "DELETE", MAC: "all"}, ctx); err != nil { msg := fmt.Sprintf("Error in sending delete all from lookup message: %v", err) diff --git a/internal/pkg/bridge/handler.go b/internal/pkg/bridge/handler.go index 5b61488..ebcce49 100644 --- a/internal/pkg/bridge/handler.go +++ b/internal/pkg/bridge/handler.go @@ -3,7 +3,6 @@ package bridge import ( "context" "encoding/json" - "fmt" "log/slog" "strings" "time" @@ -39,7 +38,6 @@ func HandleMQTTMessage(topic string, payload []byte, appState *appcontext.AppSta if !ok { continue } - fmt.Println("beacon found: ", id) adv := appcontext.BeaconAdvertisement{ ID: id, Hostname: hostname, diff --git a/location b/location index 7326f36..4f6c3dd 100755 Binary files a/location and b/location differ diff --git a/server b/server index 2b9d597..f9b9632 100755 Binary files a/server and b/server differ