From f191276b2fd5aabc9ef7c59e53714e0f88336c9c Mon Sep 17 00:00:00 2001 From: DarDarBinks Date: Tue, 23 Sep 2025 23:16:33 +0000 Subject: [PATCH] Update main.go --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b53aa5f..2f11bdd 100644 --- a/main.go +++ b/main.go @@ -169,12 +169,12 @@ func forwardToDawarich(gpsData GPSData) ForwardResult { return ForwardResult{Success: false, Error: "JSON marshal error"} } - req, err := http.NewRequest("POST", config.Dawarich.URL+"/api/v1/overland/batches", bytes.NewBuffer(jsonData)) + url := config.Dawarich.URL + "/api/v1/overland/batches?api_key=" + config.Dawarich.Token + req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { return ForwardResult{Success: false, Error: "Request creation error"} } - req.Header.Set("Authorization", "Bearer "+config.Dawarich.Token) req.Header.Set("Content-Type", "application/json") resp, err := httpClient.Do(req)