Added TODO comments for token fetching

This commit is contained in:
David J. Allen 2024-04-11 13:59:56 -06:00
parent ce553d5cc0
commit 3c90e72eb7
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -31,12 +31,14 @@ var generateCmd = &cobra.Command{
// make sure that we have a token present before trying to make request
if config.AccessToken == "" {
// check if OCHAMI_ACCESS_TOKEN env var is set if no access token is provided and use that instead
// TODO: make request to check if request will need token
// check if OCHAMI_ACCESS_TOKEN env var is set if no access token is provided and use that instead
accessToken := os.Getenv("OCHAMI_ACCESS_TOKEN")
if accessToken != "" {
config.AccessToken = accessToken
} else {
// TODO: try and fetch token first if it is needed
fmt.Printf("No token found. Attempting to generate config without one...\n")
}
}