Browse Source

Use correct key names for service configs

pull/98/head
Kegan Dougal 8 years ago
parent
commit
e4cacb1cd5
  1. 4
      config.sample.yaml
  2. 4
      src/github.com/matrix-org/go-neb/goneb.go

4
config.sample.yaml

@ -64,13 +64,13 @@ services:
Type: "giphy" Type: "giphy"
UserID: "@goneb:localhost" # requires a Syncing client UserID: "@goneb:localhost" # requires a Syncing client
Config: Config:
APIKey: "qwg4672vsuyfsfe"
api_key: "qwg4672vsuyfsfe"
- ID: "guggy_service" - ID: "guggy_service"
Type: "guggy" Type: "guggy"
UserID: "@goneb:localhost" # requires a Syncing client UserID: "@goneb:localhost" # requires a Syncing client
Config: Config:
APIKey: "2356saaqfhgfe"
api_key: "2356saaqfhgfe"
- ID: "github_cmd_service" - ID: "github_cmd_service"
Type: "github" Type: "github"

4
src/github.com/matrix-org/go-neb/goneb.go

@ -99,8 +99,8 @@ func convertKeysToStrings(iface interface{}) interface{} {
return iface // base type like string or number return iface // base type like string or number
} }
func insertServicesFromConfig(clis *clients.Clients, services []api.ConfigureServiceRequest) error {
for i, s := range services {
func insertServicesFromConfig(clis *clients.Clients, serviceReqs []api.ConfigureServiceRequest) error {
for i, s := range serviceReqs {
if err := s.Check(); err != nil { if err := s.Check(); err != nil {
return fmt.Errorf("config: Service[%d] : %s", i, err) return fmt.Errorf("config: Service[%d] : %s", i, err)
} }

Loading…
Cancel
Save