From 8382109afcbebafb5dbe6c760347d5fa538767db Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Thu, 21 Nov 2024 10:15:38 -0500 Subject: [PATCH] remove BIRDEYE key from code --- price/fetcher.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/price/fetcher.go b/price/fetcher.go index 5f51265..c8b344e 100644 --- a/price/fetcher.go +++ b/price/fetcher.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "net/http" + "os" "time" "go.uber.org/zap" @@ -83,9 +84,9 @@ func fetch(fromTime time.Time, toTime time.Time, period string, logger *zap.Logg if err != nil { return nil, fmt.Errorf("creating request: %w", err) } + k := os.Getenv("BIRDEYE_API_KEY") + req.Header.Add("X-Api-Key", k) - //todo: before making the we need to set this to a env var - req.Header.Add("X-Api-Key", "c28c10a82a614930af83a48a3b47189d") resp, err := client.Do(req) if err != nil { return nil, fmt.Errorf("sending request: %w", err)