Skip to content

Commit

Permalink
Add TODO for setting API key from environment variable
Browse files Browse the repository at this point in the history
Added a TODO comment to fetcher.go to set the API key from an environment variable before making the request, ensuring better security and flexibility. Also, removed an unnecessary newline in the main.go file for code cleanliness.
  • Loading branch information
billettc committed Nov 18, 2024
1 parent 2b585eb commit 263534c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions price/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func fetch(fromTime time.Time, toTime time.Time, period string, logger *zap.Logg
return nil, fmt.Errorf("creating request: %w", err)
}

//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 {
Expand Down

0 comments on commit 263534c

Please sign in to comment.