aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorjloup <jeanloup.jamet@gmail.com>2018-05-07 17:39:58 +0200
committerjloup <jeanloup.jamet@gmail.com>2018-05-07 17:41:18 +0200
commit16e43cc77935a979c48e75f1ec8ed792952a4ae8 (patch)
tree3aae8d5ba819a791ef28e00d6536d38af5bbdf05 /api
parentbf5deb87cef2b6f1370c808821dfb631d00590f6 (diff)
downloadFront-16e43cc77935a979c48e75f1ec8ed792952a4ae8.tar.gz
Front-16e43cc77935a979c48e75f1ec8ed792952a4ae8.tar.zst
Front-16e43cc77935a979c48e75f1ec8ed792952a4ae8.zip
Account page.
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 {