aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/market_config.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/api/market_config.go b/api/market_config.go
index 25e390d..c2248b3 100644
--- a/api/market_config.go
+++ b/api/market_config.go
@@ -45,6 +45,14 @@ func (q MarketConfigQuery) Run() (interface{}, *Error) {
45 45
46 } 46 }
47 47
48 if _, ok := config.Config["key"]; !ok {
49 config.Config["key"] = ""
50 }
51
52 if _, ok := config.Config["secret"]; !ok {
53 config.Config["secret"] = ""
54 }
55
48 return config.Config, nil 56 return config.Config, nil
49} 57}
50 58
@@ -76,7 +84,7 @@ func (q MarketBalanceQuery) Run() (interface{}, *Error) {
76 } 84 }
77 85
78 if config.Config["key"] == "" || config.Config["secret"] == "" { 86 if config.Config["key"] == "" || config.Config["secret"] == "" {
79 return nil, &Error{BadRequest, "your credentials for this market are not setup", fmt.Errorf("'%v' credentials are not setup", q.In.Market)} 87 return nil, &Error{InvalidMarketCredentials, "your credentials for this market are not setup", fmt.Errorf("'%v' credentials are not setup", q.In.Market)}
80 } 88 }
81 89
82 result := struct { 90 result := struct {