diff options
author | jloup <jloup@jloup.work> | 2018-05-13 14:10:21 +0100 |
---|---|---|
committer | jloup <jloup@jloup.work> | 2018-05-13 14:10:21 +0100 |
commit | c6aa553f48d1014f651441bbd9e023508d0a819c (patch) | |
tree | bb9af139ba3d8d4c9cc74114473e03eaef0d9004 /api/market_config.go | |
parent | a7873be28f3bcda36dd9fc54df238738c4c2b998 (diff) | |
download | Front-c6aa553f48d1014f651441bbd9e023508d0a819c.tar.gz Front-c6aa553f48d1014f651441bbd9e023508d0a819c.tar.zst Front-c6aa553f48d1014f651441bbd9e023508d0a819c.zip |
Load credentials only when user requests it.
Diffstat (limited to 'api/market_config.go')
-rw-r--r-- | api/market_config.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/market_config.go b/api/market_config.go index e7b2341..09eb8a9 100644 --- a/api/market_config.go +++ b/api/market_config.go | |||
@@ -76,7 +76,7 @@ func (q TestMarketCredentialsQuery) Run() (interface{}, *Error) { | |||
76 | } | 76 | } |
77 | 77 | ||
78 | if config == nil || config.Config["key"] == "" || config.Config["secret"] == "" { | 78 | if config == nil || config.Config["key"] == "" || config.Config["secret"] == "" { |
79 | return nil, &Error{InvalidMarketCredentials, "no market credentials", fmt.Errorf("market credentials are empty for marketId '%v'", q.In.Market)} | 79 | return nil, &Error{MarketCredentialsNotConfigured, "no market credentials", fmt.Errorf("market credentials are empty for marketId '%v'", q.In.Market)} |
80 | } | 80 | } |
81 | 81 | ||
82 | resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error { | 82 | resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error { |