Added TODO comments for token fetching
This commit is contained in:
parent
ce553d5cc0
commit
3c90e72eb7
1 changed files with 3 additions and 1 deletions
|
|
@ -31,12 +31,14 @@ var generateCmd = &cobra.Command{
|
||||||
|
|
||||||
// make sure that we have a token present before trying to make request
|
// make sure that we have a token present before trying to make request
|
||||||
if config.AccessToken == "" {
|
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")
|
accessToken := os.Getenv("OCHAMI_ACCESS_TOKEN")
|
||||||
if accessToken != "" {
|
if accessToken != "" {
|
||||||
config.AccessToken = accessToken
|
config.AccessToken = accessToken
|
||||||
} else {
|
} else {
|
||||||
|
// TODO: try and fetch token first if it is needed
|
||||||
fmt.Printf("No token found. Attempting to generate config without one...\n")
|
fmt.Printf("No token found. Attempting to generate config without one...\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue