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/const.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/const.go')
-rw-r--r-- | api/const.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/const.go b/api/const.go index 1f15c6e..2ad4d61 100644 --- a/api/const.go +++ b/api/const.go | |||
@@ -19,6 +19,7 @@ const ( | |||
19 | InvalidCredentials | 19 | InvalidCredentials |
20 | InvalidEmail | 20 | InvalidEmail |
21 | InvalidMarketCredentials | 21 | InvalidMarketCredentials |
22 | MarketCredentialsNotConfigured | ||
22 | IPRestrictedApiKey | 23 | IPRestrictedApiKey |
23 | InvalidOtp | 24 | InvalidOtp |
24 | InvalidPassword | 25 | InvalidPassword |
@@ -36,7 +37,7 @@ func StatusToHttpCode(status Status, code ErrorCode) int { | |||
36 | } | 37 | } |
37 | 38 | ||
38 | switch code { | 39 | switch code { |
39 | case BadRequest, InvalidPassword, InvalidEmail, InvalidMarketCredentials, IPRestrictedApiKey: | 40 | case BadRequest, InvalidPassword, InvalidEmail, InvalidMarketCredentials, IPRestrictedApiKey, MarketCredentialsNotConfigured: |
40 | return http.StatusBadRequest | 41 | return http.StatusBadRequest |
41 | 42 | ||
42 | case InvalidCredentials, InvalidOtp: | 43 | case InvalidCredentials, InvalidOtp: |