Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ func makeProvisionCmd(endpoint, resourceType string) func(*cobra.Command, []stri
}

// provisionResponse is the shape returned by POST /{service}/new endpoints.
// /webhook/new returns receive_url instead of connection_url.
type provisionResponse struct {
OK bool `json:"ok"`
Token string `json:"token"`
Name string `json:"name"`
ConnectionURL string `json:"connection_url"`
ReceiveURL string `json:"receive_url"`
Tier string `json:"tier"`
Note string `json:"note"`
Upgrade string `json:"upgrade"`
Expand Down
5 changes: 3 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ func initConfig() {
}

// Wire up the auth transport — no-ops when unauthenticated.
apiKey := ""
if cfg != nil {
// Priority: INSTANT_TOKEN env var > saved config (instant login).
apiKey := os.Getenv("INSTANT_TOKEN")
if apiKey == "" && cfg != nil {
apiKey = cfg.APIKey
}
HTTPClient = &http.Client{
Expand Down
Loading