Skip to content

Commit

Permalink
actually add connections
Browse files Browse the repository at this point in the history
  • Loading branch information
albertobruin committed Nov 11, 2024
1 parent 2540650 commit f0e87cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/config/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ func (c *Config) AddConnection(environmentName, name, connType string, creds map
if err := mapstructure.Decode(creds, &conn); err != nil {
return fmt.Errorf("failed to decode credentials: %w", err)
}
conn.Name = name
env.Connections.Stripe = append(env.Connections.Stripe, conn)
case "generic":
var conn GenericConnection
if err := mapstructure.Decode(creds, &conn); err != nil {
Expand Down Expand Up @@ -552,12 +554,15 @@ func (c *Config) AddConnection(environmentName, name, connType string, creds map
if err := mapstructure.Decode(creds, &conn); err != nil {
return fmt.Errorf("failed to decode credentials: %w", err)
}
conn.Name = name
env.Connections.GoogleSheets = append(env.Connections.GoogleSheets, conn)
case "chess":
var conn ChessConnection
if err := mapstructure.Decode(creds, &conn); err != nil {
return fmt.Errorf("failed to decode credentials: %w", err)
}

conn.Name = name
env.Connections.Chess = append(env.Connections.Chess, conn)
case "airtable":
var conn AirtableConnection
if err := mapstructure.Decode(creds, &conn); err != nil {
Expand Down

0 comments on commit f0e87cd

Please sign in to comment.